{ "openapi": "3.2.0", "info": { "title": "REZICS API", "version": "1.9.0" }, "components": { "schemas": { "JsonValue": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "LocalizationFilter": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "ContentLanguageSupportFilter": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } }, "$id": "#/components/schemas/ContentLanguageSupportFilter" }, "RealmPlacementFilter": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["active", "withdrawn"] } } } } } }, "TagAssertionFilter": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } }, "ScoreFilter": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, "PostFilter": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "post", "reply", "excerpt", "review", "chapter", "page", "wiki", "picture", "governance_note" ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } } } } } }, "RealmTagContextFilter": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } } } } }, "$id": "#/components/schemas/RealmTagContextFilter" }, "CollectionFilter": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } }, "BookFilter": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] } } } } } }, "UnitPredicate": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "SearchMatch": { "additionalProperties": false, "$id": "SearchMatch", "type": "object", "required": ["query"], "properties": { "query": { "minLength": 1, "maxLength": 500, "type": "string" } } }, "UnitFilter": { "$id": "UnitFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["search"], "properties": { "search": { "additionalProperties": false, "$id": "SearchMatch", "type": "object", "required": ["query"], "properties": { "query": { "minLength": 1, "maxLength": 500, "type": "string" } } }, "where": { "$ref": "#/components/schemas/UnitPredicate" } } }, { "additionalProperties": false, "type": "object", "required": ["where"], "properties": { "where": { "$ref": "#/components/schemas/UnitPredicate" } } } ] }, "DockDocument": { "additionalProperties": false, "$id": "DockDocument", "type": "object", "required": ["_type", "_key", "blocks"], "properties": { "_type": { "const": "dock-document", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "blocks": { "maxItems": 100, "type": "array", "items": { "$id": "UnitReferencedBlock", "anyOf": [ { "additionalProperties": false, "$id": "PostFullViewBlock", "type": "object", "required": ["_type", "_key", "postId"], "properties": { "_type": { "const": "post-full-view", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "postId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "$id": "UnitRefBlock", "type": "object", "required": ["_type", "_key", "unitId", "appearance"], "properties": { "_type": { "const": "unit-ref", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "appearance": { "anyOf": [ { "const": "inline", "type": "string" }, { "const": "card", "type": "string" }, { "const": "cover", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "UnitListBlock", "type": "object", "required": ["_type", "_key", "source", "layout", "limit"], "properties": { "_type": { "const": "unit-list", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "source": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitIds"], "properties": { "kind": { "const": "units", "type": "string" }, "unitIds": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "feature"], "properties": { "kind": { "const": "search", "type": "string" }, "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "DerivedSearchFeatureSource", "type": "object", "required": ["kind", "select", "query", "fallback"], "properties": { "kind": { "const": "derived", "type": "string" }, "select": { "additionalProperties": false, "$id": "DerivedSearchSelector", "type": "object", "required": ["kind", "from", "seed"], "properties": { "kind": { "const": "random-tag", "type": "string" }, "from": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer-follows", "type": "string" } } } ] }, "seed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "hours"], "properties": { "kind": { "const": "time-bucket", "type": "string" }, "hours": { "anyOf": [ { "const": 1, "type": "number" }, { "const": 6, "type": "number" }, { "const": 24, "type": "number" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "request", "type": "string" } } } ] } } }, "query": { "additionalProperties": false, "type": "object", "required": ["feature"], "properties": { "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "fallback": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hide", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } } } ] }, "layout": { "anyOf": [ { "const": "list", "type": "string" }, { "const": "grid", "type": "string" }, { "const": "carousel", "type": "string" } ] }, "limit": { "minimum": 1, "maximum": 100, "type": "integer" }, "presentation": { "additionalProperties": false, "$id": "UnitListPresentation", "type": "object", "properties": { "itemSize": { "anyOf": [ { "const": "sm", "type": "string" }, { "const": "md", "type": "string" }, { "const": "lg", "type": "string" } ] }, "headingUnitId": { "anyOf": [ { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, { "const": "selected", "type": "string" } ] }, "headingPrefixUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "viewAllTarget": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] } } } } }, { "additionalProperties": false, "$id": "SearchBlock", "type": "object", "required": ["_type", "_key", "feature"], "properties": { "_type": { "const": "search", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] } } }, { "additionalProperties": false, "$id": "FeedBlock", "type": "object", "required": ["_type", "_key", "feature", "presentation"], "properties": { "_type": { "const": "feed", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "feature": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, { "additionalProperties": false, "$id": "DerivedSearchFeatureSource", "type": "object", "required": ["kind", "select", "query", "fallback"], "properties": { "kind": { "const": "derived", "type": "string" }, "select": { "additionalProperties": false, "$id": "DerivedSearchSelector", "type": "object", "required": ["kind", "from", "seed"], "properties": { "kind": { "const": "random-tag", "type": "string" }, "from": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer-follows", "type": "string" } } } ] }, "seed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "hours"], "properties": { "kind": { "const": "time-bucket", "type": "string" }, "hours": { "anyOf": [ { "const": 1, "type": "number" }, { "const": 6, "type": "number" }, { "const": 24, "type": "number" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "request", "type": "string" } } } ] } } }, "query": { "additionalProperties": false, "type": "object", "required": ["feature"], "properties": { "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "fallback": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hide", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } } } ] }, "initialSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "presentation": { "additionalProperties": false, "type": "object", "required": ["pagination", "showResultCount"], "properties": { "pagination": { "anyOf": [ { "const": "load-more", "type": "string" }, { "const": "infinite", "type": "string" } ] }, "showResultCount": { "type": "boolean" } } } } }, { "additionalProperties": false, "$id": "MenuBlock", "type": "object", "required": ["_type", "_key", "navigationId", "orientation", "appearance"], "properties": { "_type": { "const": "menu", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "navigationId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "orientation": { "anyOf": [ { "const": "horizontal", "type": "string" }, { "const": "vertical", "type": "string" } ] }, "appearance": { "anyOf": [ { "const": "links", "type": "string" }, { "const": "buttons", "type": "string" }, { "const": "tabs", "type": "string" }, { "const": "drawer", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "ImageBlock", "type": "object", "required": ["_type", "_key", "assetId"], "properties": { "_type": { "const": "image", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": false, "$id": "UrlImageBlock", "type": "object", "required": ["_type", "_key", "url"], "properties": { "_type": { "const": "url-image", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": false, "$id": "DividerBlock", "type": "object", "required": ["_type", "_key", "style"], "properties": { "_type": { "const": "divider", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "style": { "anyOf": [ { "const": "line", "type": "string" }, { "const": "space", "type": "string" }, { "const": "section", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "columns"], "properties": { "_type": { "const": "columns", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "columns": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["_key", "weight", "blocks"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "weight": { "minimum": 1, "maximum": 12, "type": "integer" }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "layout", "blocks"], "properties": { "_type": { "const": "group", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "layout": { "anyOf": [ { "const": "stack", "type": "string" }, { "const": "row", "type": "string" }, { "const": "grid", "type": "string" } ] }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "tone", "blocks"], "properties": { "_type": { "const": "callout", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "tone": { "anyOf": [ { "const": "neutral", "type": "string" }, { "const": "info", "type": "string" }, { "const": "success", "type": "string" }, { "const": "warning", "type": "string" }, { "const": "danger", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "blocks": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "tabs"], "properties": { "_type": { "const": "tabs", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "tabs": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["_key", "labelUnitId", "blocks"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } } } } } ] } } } }, "NavigationDocument": { "additionalProperties": false, "$id": "NavigationDocument", "type": "object", "required": ["_type", "_key", "items"], "properties": { "_type": { "const": "navigation-document", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "items": { "minItems": 1, "type": "array", "items": { "$id": "NavigationItem", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["_key", "labelUnitId", "target"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["_key", "labelUnitId", "children"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "children": { "minItems": 1, "type": "array", "items": { "$ref": "NavigationItem" } } } } ] } } } }, "PortableTextDocument": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "UnitReferencedBlockDocument": { "additionalProperties": false, "$id": "UnitReferencedBlockDocument", "type": "object", "required": ["_type", "_key", "blocks"], "properties": { "_type": { "const": "block-document", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "blocks": { "maxItems": 100, "type": "array", "items": { "$id": "UnitReferencedBlock", "anyOf": [ { "additionalProperties": false, "$id": "PostFullViewBlock", "type": "object", "required": ["_type", "_key", "postId"], "properties": { "_type": { "const": "post-full-view", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "postId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "$id": "UnitRefBlock", "type": "object", "required": ["_type", "_key", "unitId", "appearance"], "properties": { "_type": { "const": "unit-ref", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "appearance": { "anyOf": [ { "const": "inline", "type": "string" }, { "const": "card", "type": "string" }, { "const": "cover", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "UnitListBlock", "type": "object", "required": ["_type", "_key", "source", "layout", "limit"], "properties": { "_type": { "const": "unit-list", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "source": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitIds"], "properties": { "kind": { "const": "units", "type": "string" }, "unitIds": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "feature"], "properties": { "kind": { "const": "search", "type": "string" }, "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "DerivedSearchFeatureSource", "type": "object", "required": ["kind", "select", "query", "fallback"], "properties": { "kind": { "const": "derived", "type": "string" }, "select": { "additionalProperties": false, "$id": "DerivedSearchSelector", "type": "object", "required": ["kind", "from", "seed"], "properties": { "kind": { "const": "random-tag", "type": "string" }, "from": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer-follows", "type": "string" } } } ] }, "seed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "hours"], "properties": { "kind": { "const": "time-bucket", "type": "string" }, "hours": { "anyOf": [ { "const": 1, "type": "number" }, { "const": 6, "type": "number" }, { "const": 24, "type": "number" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "request", "type": "string" } } } ] } } }, "query": { "additionalProperties": false, "type": "object", "required": ["feature"], "properties": { "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "fallback": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hide", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } } } ] }, "layout": { "anyOf": [ { "const": "list", "type": "string" }, { "const": "grid", "type": "string" }, { "const": "carousel", "type": "string" } ] }, "limit": { "minimum": 1, "maximum": 100, "type": "integer" }, "presentation": { "additionalProperties": false, "$id": "UnitListPresentation", "type": "object", "properties": { "itemSize": { "anyOf": [ { "const": "sm", "type": "string" }, { "const": "md", "type": "string" }, { "const": "lg", "type": "string" } ] }, "headingUnitId": { "anyOf": [ { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, { "const": "selected", "type": "string" } ] }, "headingPrefixUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "viewAllTarget": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] } } } } }, { "additionalProperties": false, "$id": "SearchBlock", "type": "object", "required": ["_type", "_key", "feature"], "properties": { "_type": { "const": "search", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] } } }, { "additionalProperties": false, "$id": "FeedBlock", "type": "object", "required": ["_type", "_key", "feature", "presentation"], "properties": { "_type": { "const": "feed", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "feature": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, { "additionalProperties": false, "$id": "DerivedSearchFeatureSource", "type": "object", "required": ["kind", "select", "query", "fallback"], "properties": { "kind": { "const": "derived", "type": "string" }, "select": { "additionalProperties": false, "$id": "DerivedSearchSelector", "type": "object", "required": ["kind", "from", "seed"], "properties": { "kind": { "const": "random-tag", "type": "string" }, "from": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer-follows", "type": "string" } } } ] }, "seed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "hours"], "properties": { "kind": { "const": "time-bucket", "type": "string" }, "hours": { "anyOf": [ { "const": 1, "type": "number" }, { "const": 6, "type": "number" }, { "const": 24, "type": "number" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "request", "type": "string" } } } ] } } }, "query": { "additionalProperties": false, "type": "object", "required": ["feature"], "properties": { "feature": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "global", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "zone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "filterDocument"], "properties": { "kind": { "const": "inline", "type": "string" }, "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "anyOf": [ { "const": "units", "type": "string" }, { "const": "users", "type": "string" }, { "const": "entities", "type": "string" }, { "const": "tags", "type": "string" }, { "const": "posts", "type": "string" }, { "const": "realms", "type": "string" }, { "const": "collections", "type": "string" }, { "const": "reviews", "type": "string" }, { "const": "polls", "type": "string" } ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "realm", "view" ], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": [ "range" ], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "kind" ], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "kind", "id" ], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": [ "in" ], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "realm-tag-vote", "type": "string" } ] }, "enabled": { "type": "boolean" }, "disclosure": { "anyOf": [ { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } } } } ] }, "sort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "fallback": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hide", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "collectionId"], "properties": { "kind": { "const": "collection", "type": "string" }, "collectionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } } } ] }, "initialSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "presentation": { "additionalProperties": false, "type": "object", "required": ["pagination", "showResultCount"], "properties": { "pagination": { "anyOf": [ { "const": "load-more", "type": "string" }, { "const": "infinite", "type": "string" } ] }, "showResultCount": { "type": "boolean" } } } } }, { "additionalProperties": false, "$id": "MenuBlock", "type": "object", "required": ["_type", "_key", "navigationId", "orientation", "appearance"], "properties": { "_type": { "const": "menu", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "navigationId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "orientation": { "anyOf": [ { "const": "horizontal", "type": "string" }, { "const": "vertical", "type": "string" } ] }, "appearance": { "anyOf": [ { "const": "links", "type": "string" }, { "const": "buttons", "type": "string" }, { "const": "tabs", "type": "string" }, { "const": "drawer", "type": "string" } ] } } }, { "additionalProperties": false, "$id": "ImageBlock", "type": "object", "required": ["_type", "_key", "assetId"], "properties": { "_type": { "const": "image", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": false, "$id": "UrlImageBlock", "type": "object", "required": ["_type", "_key", "url"], "properties": { "_type": { "const": "url-image", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": false, "$id": "DividerBlock", "type": "object", "required": ["_type", "_key", "style"], "properties": { "_type": { "const": "divider", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "style": { "anyOf": [ { "const": "line", "type": "string" }, { "const": "space", "type": "string" }, { "const": "section", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "columns"], "properties": { "_type": { "const": "columns", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "columns": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["_key", "weight", "blocks"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "weight": { "minimum": 1, "maximum": 12, "type": "integer" }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "layout", "blocks"], "properties": { "_type": { "const": "group", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "layout": { "anyOf": [ { "const": "stack", "type": "string" }, { "const": "row", "type": "string" }, { "const": "grid", "type": "string" } ] }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "tone", "blocks"], "properties": { "_type": { "const": "callout", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "tone": { "anyOf": [ { "const": "neutral", "type": "string" }, { "const": "info", "type": "string" }, { "const": "success", "type": "string" }, { "const": "warning", "type": "string" }, { "const": "danger", "type": "string" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "blocks": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } }, { "additionalProperties": false, "type": "object", "required": ["_type", "_key", "tabs"], "properties": { "_type": { "const": "tabs", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "tabs": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["_key", "labelUnitId", "blocks"], "properties": { "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "blocks": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "UnitReferencedBlock" } } } } } } } ] } } } }, "FilterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "where": { "$ref": "#/components/schemas/UnitPredicate" }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } }, "ZoneThemeDocument": { "additionalProperties": false, "$id": "ZoneThemeDocument", "type": "object", "required": ["_type", "_key", "colorScheme", "accent", "density"], "properties": { "_type": { "const": "zone-theme", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "colorScheme": { "type": "string", "enum": ["system", "light", "dark"] }, "accent": { "pattern": "^#[0-9a-fA-F]{6}$", "type": "string" }, "density": { "type": "string", "enum": ["comfortable", "compact"] }, "heroAssetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "cardRadius": { "type": "string", "enum": ["sm", "md", "lg"] }, "headingFontScale": { "type": "string", "enum": ["sm", "md", "lg"] }, "surfaceTint": { "type": "string", "enum": ["none", "subtle", "accent"] }, "custom": { "additionalProperties": false, "$id": "ZoneCustomThemeReference", "type": "object", "required": ["themeUnitId", "revisionId"], "properties": { "themeUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "revisionId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } }, "SearchFeatureDefinition": { "additionalProperties": false, "$id": "SearchFeatureDefinition", "type": "object", "required": ["filterDocument", "categories", "query", "sort", "controls"], "properties": { "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "query": { "additionalProperties": false, "type": "object", "required": ["enabled"], "properties": { "enabled": { "type": "boolean" }, "required": { "type": "boolean" } } }, "sort": { "additionalProperties": false, "type": "object", "required": ["search", "feed"], "properties": { "search": { "additionalProperties": false, "$id": "SearchSortConfiguration", "type": "object", "required": ["defaults", "options"], "properties": { "defaults": { "additionalProperties": false, "type": "object", "required": ["emptyQuery", "textQuery"], "properties": { "emptyQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "textQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "options": { "minItems": 1, "maxItems": 18, "type": "array", "items": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } } }, "feed": { "additionalProperties": false, "$id": "SearchSortConfiguration", "type": "object", "required": ["defaults", "options"], "properties": { "defaults": { "additionalProperties": false, "type": "object", "required": ["emptyQuery", "textQuery"], "properties": { "emptyQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "textQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "options": { "minItems": 1, "maxItems": 18, "type": "array", "items": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } } } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "ResolvedSearchControl", "type": "object", "required": ["key", "field", "component", "operators", "enabled", "disclosure"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "component": { "type": "string", "enum": [ "select", "multi-select", "toggle", "date-range", "value-range", "realm-tag-vote" ] }, "operators": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "type": "string", "enum": [ "equals", "not-equals", "any-of", "all-of", "none-of", "range", "exists", "matches" ] } }, "optionSource": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "facet", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "options"], "properties": { "kind": { "const": "static", "type": "string" }, "options": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "required": { "default": false, "type": "boolean" }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] } } } } } }, "ApiErrorCode": { "type": "string", "enum": [ "MalformedRequestBody", "ValidationError", "InternalError", "VoteHotKeyBusy", "TagNotDirectlyApplicable", "ContentLabelApplicationInvalid", "ContentLabelJudgmentForbidden", "ContentLabelUnitMergeForbidden", "TagApplicationHasJudgments", "RealmTagContextInUse", "ContentLabelPlatformApplyForbidden", "ContentLabelPlatformIdentityImmutable", "ContentLabelPlatformRemovalForbidden", "AuthenticationRequired", "ApiTokenPermissionRequired", "ApiTokenRateLimitExceeded", "ApiQuotaExceeded", "InteractiveSessionRequired", "FreshSessionRequired", "EmailVerificationRequired", "AccountSuspended", "AccountClosed", "AccountRestricted", "RealmCapabilityRequired", "RealmRulesAcceptanceRequired", "PlatformCapabilityRequired", "PlatformAccessManagerRequired", "PlatformAccessRevisionConflict", "PlatformAccessConfigurationInvalid", "CollectionOwnershipRequired", "UnitNotFound", "UnitPermissionForbidden", "UnitAccessRestricted", "UnitLicenseGrantForbidden", "UnitLicenseNotApplicable", "UnitLicenseOfferingEndForbidden", "UnitLicenseGrantConflict", "UnitChanged", "UnitContentLanguageSupportInvalid", "VideoAudioTrackInvalid", "UnitRealmPublicationNotFound", "UnitRealmPublicationAlreadyExists", "UnitRealmPublicationTransitionInvalid", "UnitRevisionConflict", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired", "UnitLocalizationOrderChanged", "UnitLocalizationOrderInvalid", "UnitLocalizationNotFound", "UnitLastLocalizationRemovalForbidden", "UnitVariantKindMismatch", "UnitVariantTargetIsVariant", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantChanged", "UnitVariantMainUnavailable", "InvalidSlug", "SlugTaken", "SlugReserved", "ProfileSlugChangeUnavailable", "SlugScopeNotFound", "SlugScopeUnavailable", "SlugScopeCycle", "SlugDepthExceeded", "UnitAddressMutationForbidden", "SlugRedirectNotFound", "UnitSlugAddressNotFound", "AssociationProposalNotFound", "AssociationProposalConflict", "AssociationProposalExpired", "AssociationProposalExpiryInvalid", "AssociationProposalRoleInvalid", "AssociationContextPostInvalid", "EntityEntryNotFound", "EntityAssociationRestricted", "CreditAttributionNotFound", "CreditAttributionRoleInvalid", "CreditAttributionRequestConfirmationRequired", "SubjectAssociationNotFound", "UserSelfFollowForbidden", "UserFollowBlocked", "FollowingTargetKindMismatch", "ImageAssetNotFound", "ImageAssetUploadNotFound", "ImageAssetUnsupportedType", "ImageAssetInvalidSize", "ImageAssetContentMismatch", "ImageAssetInvalidState", "ImageAssetInvalidPresentation", "ImageAssetInUse", "ApiTokenNotFound", "ApiTokenLimitReached", "ApiTokenQuotaOverrideInvalid", "ApiTokenQuotaOverrideRevisionConflict", "ApiQuotaPolicyNotFound", "ApiQuotaPolicyInvalid", "ApiQuotaPolicyKeyConflict", "ApiQuotaPolicyRevisionConflict", "ApiAccountQuotaRevisionConflict", "ApiTokenQuotaRevisionConflict", "TagNotFound", "TagPathNotFound", "TagPathApplicationNotFound", "InvalidTagPath", "TagPathDefinitionConflict", "TagPathMergeNotFound", "InvalidTagPathMerge", "InvalidSearch", "SearchUnavailable", "SharedSearchQueryNotFound", "InvalidPaginationCursor", "ProfileNotFound", "ProfileChanged", "PreferencesNotFound", "UserNotFound", "UserSelfBlockForbidden", "UserAccountStateRevisionConflict", "UserSelfStatusChangeForbidden", "PlatformUserManagerRequired", "UserAccountStateExpiryInvalid", "SessionNotFound", "StudioRealmSubjectLimitExceeded", "SoftwareSystemRequirementSourceInvalid", "SeriesReleaseNotFound", "ZonePageNotFound", "ZonePageInUse", "ZoneNavigationNotFound", "ZoneNavigationInUse", "ZoneDocumentInvalid", "ZoneTimeRangeInvalid", "ZoneRuleRealmInvalid", "SoftwareNotFound", "SystemRequirementNotFound", "DockNotFound", "DockNotSupported", "DockDocumentInvalid", "DockRevisionConflict", "PollOptionsDuplicated", "PollNotFound", "PollClosed", "PollSingleChoiceInvalid", "PollOptionInvalid", "PollAlreadyClosed", "ProgressEntryNotFound", "ContentStructureInvalid", "ContentStructureNotFound", "ContentStructureRevisionConflict", "BookNotFound", "MediaNotFound", "ContentStructureNodeNotFound", "ChapterNotFound", "ChapterLanguageNotFound", "ReviewNotFound", "GovernanceNoteNotFound", "ContentGovernanceTargetNotFound", "ContentReviewRealmMissing", "ContentReviewCaseNotFound", "ContentGovernanceReversedActionInvalid", "ContentGovernanceActionIncompatible", "ContentGovernanceTransitionInvalid", "ContentGovernanceActionNoEffect", "ContentGovernanceReversalUnavailable", "ContentGovernanceIdempotencyConflict", "GovernanceNoteRoleDuplicate", "GovernanceRuleSourceForbidden", "GovernanceRuleChanged", "GovernanceReversalUnavailable", "EnforcementExpiryInvalid", "EnforcementNotFound", "EnforcementAlreadyRevoked", "EnforcementChanged", "CapabilityGrantExpiryInvalid", "CapabilityGrantNotFound", "UnitAccessExpiryInvalid", "UnitAccessInvitationNotFound", "UnitAccessInvitationConflict", "UnitAccessInvitationExpired", "UnitAccessInvitationSelfForbidden", "UnitAccessConfigurationInvalid", "UnitOwnerRestrictionForbidden", "UnitOwnershipChanged", "UnitOwnershipTargetIneligible", "UnitOwnershipRelinquishmentForbidden", "UnitOwnershipOverrideConfirmationInvalid", "UnitLifecycleConfirmationInvalid", "UnitLifecycleChanged", "UnitLifecycleProtected", "UnitAlreadyDeleted", "UnitNotDeleted", "UnitMergeNotFound", "UnitMergeConfirmationInvalid", "UnitMergeKindIneligible", "UnitMergeKindMismatch", "UnitMergeRequestConflict", "UnitMergeMeasurementConflict", "UnitMergeIdempotencyConflict", "UnitMergeManifestStale", "UnitMergeReviewSelfForbidden", "UnitMergeReviewDuplicate", "UnitMergeReviewFingerprintMismatch", "UnitMergeRequestNotPending", "UnitMergeRequestExpired", "UnitMergeRetryUnavailable", "ReportRealmMismatch", "ReportAlreadySubmitted", "ReportTargetRevisionUnavailable", "ReportRuleUnavailable", "ReportRuleChanged", "ReportRuleSourceForbidden", "PostNotFound", "PostLocalizationNotFound", "PostTargetingLocked", "ReplyPostNotFound", "ParentReplyNotFound", "ReplyDepthExceeded", "PostScoreNotFound", "PostScoreDuplicate", "PostTagMentionVoteConflict", "InvalidNotificationCursor", "NotificationNotFound", "UnitOwnershipClaimUnavailable", "UnitOwnershipClaimAlreadyPending", "UnitOwnershipClaimNotFound", "UnitOwnershipClaimChanged", "UnitOwnershipClaimConfirmationInvalid", "UnitOwnershipClaimSelfDecisionForbidden", "AliasNotFound", "TagApplicationNotFound", "UnitTagCurationChanged", "UnitExternalLinkNotFound", "UnitReferenceCurationChanged", "UnitReferenceLimitReached", "UnitReferencePinnedLimitReached", "UnitReferenceWithdrawn", "InvalidMessageCursor", "ConversationNotFound", "ConversationParticipantsInvalid", "DirectMessageBlocked", "MessageNotFound", "CollectionNotFound", "FavoritesEditForbidden", "FavoritesDeleteForbidden", "CollectionStructureRevisionConflict", "RealmNotFound", "RealmMembershipNotFound", "RealmOwnerLeaveForbidden", "RealmRuleRevisionChanged", "RealmMemberNotFound", "RealmUnitNotFound", "RealmScoreContextPostNotMounted", "RealmScoreContextPostKindInvalid", "RealmTagContextNotFound", "RealmTagContextAlreadyExists", "RealmTagContextPostNotMounted", "RealmTagContextPostAlreadyUsed", "RealmTagVotingDisabled", "RealmTagContextRequired", "RealmTagSelfReferenceForbidden", "WikiNavigationNotFound", "WikiNavigationInUse", "WikiNavigationDocumentInvalid", "InvalidFeedCursor", "InvalidFeedFilter", "InvalidHistoryCursor", "UnitRevisionNotFound", "CurrentRevisionContentVisibilityForbidden", "ZoneThemeNotFound", "ZoneThemeRevisionNotFound", "ZoneThemeStylesheetInvalid", "ZoneThemeAssetsInvalid", "ZoneThemeAutomatedReviewInvalid", "ZoneThemeRevisionStateConflict", "ZoneThemeReferenceInvalid" ] }, "MalformedRequestBody": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["MalformedRequestBody"] }, "message": { "type": "string" } } }, "requestId": { "type": "string" } } }, "ValidationError": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } }, "InternalError": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["InternalError"] }, "message": { "type": "string" } } }, "requestId": { "type": "string" } } } }, "securitySchemes": { "ApiToken": { "type": "http", "scheme": "bearer", "bearerFormat": "REZICS API token", "description": "Use Authorization: Bearer rz_api_. Never put tokens in URLs." }, "SessionCookie": { "type": "apiKey", "in": "cookie", "name": "better-auth.session_token", "description": "Interactive browser session used by the REZICS first-party application." } } }, "paths": { "/image-assets/{id}/presentations/{role}/content": { "get": { "summary": "Resolve rendered image asset presentation", "tags": ["Image Assets"], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "role", "in": "path", "required": true, "schema": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] } } ], "responses": { "302": { "description": "Response for status 302", "content": { "type": "void" } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getImage-assetsByIdPresentationsByRoleContent", "x-rezics-quota-route-operation-id": "getImage-assetsByIdPresentationsByRoleContent", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/image-assets/{id}/content": { "get": { "summary": "Resolve image asset content", "tags": ["Image Assets"], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "302": { "description": "Response for status 302", "content": { "type": "void" } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getImage-assetsByIdContent", "x-rezics-quota-route-operation-id": "getImage-assetsByIdContent", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals": { "get": { "summary": "List Unit association proposals", "tags": ["Unit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "side", "in": "query", "required": true, "schema": { "type": "string", "enum": ["source", "target"] } }, { "name": "kind", "in": "query", "required": true, "schema": { "default": "credit", "type": "string", "enum": ["credit", "subject"] } }, { "name": "includeResolved", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "sourceUnitId", "targetUnitId", "direction", "createdByProfileId", "expiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt", "kind", "role", "contextPostId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "direction": { "type": "string", "enum": ["request", "invitation"] }, "createdByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "kind": { "default": "credit", "type": "string", "enum": ["credit", "subject"] }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitByUnitIdAssociation-proposals", "x-rezics-quota-route-operation-id": "getApiUnitByUnitIdAssociation-proposals", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals/requests": { "post": { "summary": "Request Unit association", "tags": ["Unit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["targetUnitId", "kind", "role", "expiresAt"], "properties": { "targetUnitId": { "format": "uuid", "type": "string" }, "kind": { "const": "credit", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "expiresAt": { "format": "date-time", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["targetUnitId", "kind", "role", "expiresAt"], "properties": { "targetUnitId": { "format": "uuid", "type": "string" }, "kind": { "const": "subject", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "sourceUnitId", "targetUnitId", "direction", "createdByProfileId", "expiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt", "kind", "role", "contextPostId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "direction": { "type": "string", "enum": ["request", "invitation"] }, "createdByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "kind": { "default": "credit", "type": "string", "enum": ["credit", "subject"] }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalExpiryInvalid", "type": "string", "enum": [ "AssociationProposalExpiryInvalid", "AssociationProposalRoleInvalid", "AssociationContextPostInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalConflict", "type": "string", "enum": ["AssociationProposalConflict", "AssociationProposalExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitByUnitIdAssociation-proposalsRequests", "x-rezics-quota-route-operation-id": "postApiUnitByUnitIdAssociation-proposalsRequests", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals/invitations": { "post": { "summary": "Invite Unit to association", "tags": ["Unit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["sourceUnitId", "kind", "role", "expiresAt"], "properties": { "sourceUnitId": { "format": "uuid", "type": "string" }, "kind": { "const": "credit", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "expiresAt": { "format": "date-time", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["sourceUnitId", "kind", "role", "expiresAt"], "properties": { "sourceUnitId": { "format": "uuid", "type": "string" }, "kind": { "const": "subject", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "sourceUnitId", "targetUnitId", "direction", "createdByProfileId", "expiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt", "kind", "role", "contextPostId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "direction": { "type": "string", "enum": ["request", "invitation"] }, "createdByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "kind": { "default": "credit", "type": "string", "enum": ["credit", "subject"] }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalExpiryInvalid", "type": "string", "enum": [ "AssociationProposalExpiryInvalid", "AssociationProposalRoleInvalid", "AssociationContextPostInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalConflict", "type": "string", "enum": ["AssociationProposalConflict", "AssociationProposalExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitByUnitIdAssociation-proposalsInvitations", "x-rezics-quota-route-operation-id": "postApiUnitByUnitIdAssociation-proposalsInvitations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals/{proposalId}/accept": { "post": { "summary": "Accept Unit association proposal", "tags": ["Unit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "proposalId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "sourceUnitId", "targetUnitId", "direction", "createdByProfileId", "expiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt", "kind", "role", "contextPostId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "direction": { "type": "string", "enum": ["request", "invitation"] }, "createdByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "kind": { "default": "credit", "type": "string", "enum": ["credit", "subject"] }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalConflict", "type": "string", "enum": ["AssociationProposalConflict", "AssociationProposalExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitByUnitIdAssociation-proposalsByProposalIdAccept", "x-rezics-quota-route-operation-id": "postApiUnitByUnitIdAssociation-proposalsByProposalIdAccept", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals/{proposalId}/decline": { "post": { "summary": "Decline Unit association proposal", "tags": ["Unit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "proposalId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": {} } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "sourceUnitId", "targetUnitId", "direction", "createdByProfileId", "expiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt", "kind", "role", "contextPostId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "direction": { "type": "string", "enum": ["request", "invitation"] }, "createdByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "kind": { "default": "credit", "type": "string", "enum": ["credit", "subject"] }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor", "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalConflict", "type": "string", "enum": ["AssociationProposalConflict", "AssociationProposalExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitByUnitIdAssociation-proposalsByProposalIdDecline", "x-rezics-quota-route-operation-id": "postApiUnitByUnitIdAssociation-proposalsByProposalIdDecline", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/unit/{unitId}/association-proposals/{proposalId}": { "delete": { "summary": "Cancel Unit association proposal", "tags": ["Unit"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "EntityAssociationRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "EntityEntryNotFound", "AssociationProposalNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationProposalConflict", "type": "string", "enum": ["AssociationProposalConflict", "AssociationProposalExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "proposalId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiUnitByUnitIdAssociation-proposalsByProposalId", "x-rezics-quota-route-operation-id": "deleteApiUnitByUnitIdAssociation-proposalsByProposalId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/startup": { "get": { "summary": "Process startup", "tags": ["System"], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["status"], "properties": { "status": { "const": "ok", "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiStartup", "x-rezics-quota-route-operation-id": "getApiStartup", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/health": { "get": { "summary": "Process health", "tags": ["System"], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["status"], "properties": { "status": { "const": "ok", "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHealth", "x-rezics-quota-route-operation-id": "getApiHealth", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "head": { "summary": "Process health without a response body", "tags": ["System"], "responses": { "204": { "description": "No Content" }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "headApiHealth", "x-rezics-quota-route-operation-id": "headApiHealth", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/ready": { "get": { "summary": "Dependency readiness", "tags": ["System"], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["status", "checks"], "properties": { "status": { "type": "string", "enum": ["ready", "unavailable"] }, "checks": { "type": "object", "required": ["database", "storage", "recommendations", "search"], "properties": { "database": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "storage": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "recommendations": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "search": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["status", "checks"], "properties": { "status": { "type": "string", "enum": ["ready", "unavailable"] }, "checks": { "type": "object", "required": ["database", "storage", "recommendations", "search"], "properties": { "database": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "storage": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "recommendations": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "search": { "type": "object", "required": ["state", "latencyMs"], "properties": { "state": { "default": "ready", "type": "string", "enum": ["ready", "degraded", "unavailable"] }, "latencyMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } } } } } } }, "operationId": "getApiReady", "x-rezics-quota-route-operation-id": "getApiReady", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications": { "get": { "summary": "Poll notifications with a cursor", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "direction", "in": "query", "required": false, "schema": { "type": "string", "enum": ["before", "after"] } }, { "name": "unreadOnly", "in": "query", "required": false, "schema": { "default": false, "type": "boolean" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor", "pollCursor", "unreadCount"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "reply", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "reply", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "postId"], "properties": { "kind": { "const": "post", "type": "string" }, "postId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "new_follower", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "new_follower", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["id", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "direct_message", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "conversationId"], "properties": { "type": { "const": "direct_message", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "messageId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "conversationId"], "properties": { "kind": { "const": "conversation", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "messageId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "moderation", "type": "string" }, "context": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "actionId", "actionKind"], "properties": { "type": { "const": "content_governance_action", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "publicNoticePostId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "reportId", "referralId"], "properties": { "type": { "const": "report_resolution", "type": "string" }, "reportId": { "format": "uuid", "type": "string" }, "referralId": { "format": "uuid", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "resolution": { "const": "dismissed", "type": "string" }, "publicNoticePostId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "actionId", "actionKind", "enforcementKind" ], "properties": { "type": { "const": "account_enforcement_action", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "anyOf": [ { "const": "issue", "type": "string" }, { "const": "revoke", "type": "string" } ] }, "enforcementKind": { "type": "string", "enum": [ "warning", "silence", "suspension", "ban", "rate_limit", "trust_restriction" ] }, "publicNoticePostId": { "format": "uuid", "type": "string" } } } ] }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "reportId"], "properties": { "kind": { "const": "report", "type": "string" }, "reportId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "realm", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "event"], "properties": { "type": { "const": "realm_event", "type": "string" }, "event": { "const": "membership_updated", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "realm"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "additionalProperties": false, "type": "object", "required": ["id", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "system", "type": "string" }, "context": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_access_invitation", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["invitationId"], "properties": { "invitationId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_ownership_override", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["ownershipId", "role"], "properties": { "ownershipId": { "format": "uuid", "type": "string" }, "role": { "anyOf": [ { "const": "owner", "type": "string" }, { "const": "previous_owner", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_ownership_claim_resolution", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["claimId", "resolution"], "properties": { "claimId": { "format": "uuid", "type": "string" }, "resolution": { "anyOf": [ { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }, { "const": "superseded", "type": "string" } ] } } } } } ] }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId", "invitationId"], "properties": { "kind": { "const": "access_invitation", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitationId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unit"], "properties": { "kind": { "const": "unit", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } } ] } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "pollCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "unreadCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidNotificationCursor", "type": "string", "enum": ["InvalidNotificationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiNotifications", "x-rezics-quota-route-operation-id": "getApiNotifications", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications/unread-count": { "get": { "summary": "Get unread notification count", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["count"], "properties": { "count": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiNotificationsUnread-count", "x-rezics-quota-route-operation-id": "getApiNotificationsUnread-count", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications/{notificationId}": { "get": { "summary": "Get one notification", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "notificationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "reply", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "reply", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "postId"], "properties": { "kind": { "const": "post", "type": "string" }, "postId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "new_follower", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "new_follower", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["id", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "direct_message", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "conversationId"], "properties": { "type": { "const": "direct_message", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "messageId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "conversationId"], "properties": { "kind": { "const": "conversation", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "messageId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "moderation", "type": "string" }, "context": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "actionId", "actionKind"], "properties": { "type": { "const": "content_governance_action", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "publicNoticePostId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "reportId", "referralId"], "properties": { "type": { "const": "report_resolution", "type": "string" }, "reportId": { "format": "uuid", "type": "string" }, "referralId": { "format": "uuid", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "resolution": { "const": "dismissed", "type": "string" }, "publicNoticePostId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "actionId", "actionKind", "enforcementKind"], "properties": { "type": { "const": "account_enforcement_action", "type": "string" }, "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "anyOf": [ { "const": "issue", "type": "string" }, { "const": "revoke", "type": "string" } ] }, "enforcementKind": { "type": "string", "enum": [ "warning", "silence", "suspension", "ban", "rate_limit", "trust_restriction" ] }, "publicNoticePostId": { "format": "uuid", "type": "string" } } } ] }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "reportId"], "properties": { "kind": { "const": "report", "type": "string" }, "reportId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "realm", "type": "string" }, "context": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "event"], "properties": { "type": { "const": "realm_event", "type": "string" }, "event": { "const": "membership_updated", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "realm"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "additionalProperties": false, "type": "object", "required": ["id", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } }, { "type": "object", "required": [ "id", "title", "body", "actor", "subject", "readAt", "createdAt", "kind", "context", "destination" ], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "actor": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "name", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "kind": { "const": "system", "type": "string" }, "context": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_access_invitation", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["invitationId"], "properties": { "invitationId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_ownership_override", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["ownershipId", "role"], "properties": { "ownershipId": { "format": "uuid", "type": "string" }, "role": { "anyOf": [ { "const": "owner", "type": "string" }, { "const": "previous_owner", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "event", "references"], "properties": { "type": { "const": "system_event", "type": "string" }, "event": { "const": "unit_ownership_claim_resolution", "type": "string" }, "references": { "additionalProperties": false, "type": "object", "required": ["claimId", "resolution"], "properties": { "claimId": { "format": "uuid", "type": "string" }, "resolution": { "anyOf": [ { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }, { "const": "superseded", "type": "string" } ] } } } } } ] }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "unavailable", "type": "string" } } } ] }, "destination": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId", "invitationId"], "properties": { "kind": { "const": "access_invitation", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitationId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unit"], "properties": { "kind": { "const": "unit", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "kind", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "notificationId"], "properties": { "kind": { "const": "notification_details", "type": "string" }, "notificationId": { "format": "uuid", "type": "string" } } } ] } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "NotificationNotFound", "type": "string", "enum": ["NotificationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiNotificationsByNotificationId", "x-rezics-quota-route-operation-id": "getApiNotificationsByNotificationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications/read-all": { "put": { "summary": "Mark notifications read", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "through": { "maxLength": 512, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "readAt"], "properties": { "updated": { "type": "boolean" }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidNotificationCursor", "type": "string", "enum": ["InvalidNotificationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiNotificationsRead-all", "x-rezics-quota-route-operation-id": "putApiNotificationsRead-all", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications/{notificationId}/read": { "put": { "summary": "Mark one notification read", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "notificationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "readAt"], "properties": { "updated": { "type": "boolean" }, "readAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "NotificationNotFound", "type": "string", "enum": ["NotificationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiNotificationsByNotificationIdRead", "x-rezics-quota-route-operation-id": "putApiNotificationsByNotificationIdRead", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/notifications/preferences": { "get": { "summary": "Get notification preferences", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["kind", "inApp", "email"], "properties": { "kind": { "type": "string" }, "inApp": { "type": "boolean" }, "email": { "type": "boolean" } } } } } } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiNotificationsPreferences", "x-rezics-quota-route-operation-id": "getApiNotificationsPreferences", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Update notification preferences", "tags": ["Notifications"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "minItems": 1, "maxItems": 6, "type": "array", "items": { "type": "object", "required": ["kind", "inApp", "email"], "properties": { "kind": { "type": "string", "enum": [ "reply", "new_follower", "direct_message", "moderation", "realm", "system" ] }, "inApp": { "type": "boolean" }, "email": { "type": "boolean" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["kind", "inApp", "email"], "properties": { "kind": { "type": "string" }, "inApp": { "type": "boolean" }, "email": { "type": "boolean" } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiNotificationsPreferences", "x-rezics-quota-route-operation-id": "putApiNotificationsPreferences", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/ownership-claims": { "post": { "summary": "Claim ownership of a community-owned Unit", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["unitId", "details"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "details": { "minLength": 1, "maxLength": 2000, "pattern": ".*\\S.*", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimUnavailable", "type": "string", "enum": [ "UnitOwnershipClaimUnavailable", "UnitOwnershipClaimAlreadyPending" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiOwnership-claims", "x-rezics-quota-route-operation-id": "postApiOwnership-claims", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/ownership-claims/{claimId}/withdraw": { "post": { "summary": "Withdraw a pending Unit ownership claim", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "claimId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimNotFound", "type": "string", "enum": ["UnitOwnershipClaimNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimChanged", "type": "string", "enum": ["UnitOwnershipClaimChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiOwnership-claimsByClaimIdWithdraw", "x-rezics-quota-route-operation-id": "postApiOwnership-claimsByClaimIdWithdraw", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/recommendations/units": { "get": { "summary": "Recommend Units", "tags": ["Recommendations"], "parameters": [ { "name": "type", "in": "query", "required": false, "schema": { "type": "string", "enum": ["book", "software", "media"] } }, { "name": "seedUnitId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "personalized", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "type", "language", "contentRating", "publishedAt", "createdAt", "updatedAt", "title", "summary", "cover", "recommendationReason", "source", "tracking" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media"] }, "language": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "contentRating": { "type": "string" }, "publishedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "source": { "nullable": true, "anyOf": [ { "default": "direct", "type": "string", "enum": ["direct", "main"] }, { "type": "null" } ] }, "tracking": { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRecommendationsUnits", "x-rezics-quota-route-operation-id": "getApiRecommendationsUnits", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/recommendations/posts/{postId}": { "get": { "summary": "Recommend related posts", "tags": ["Recommendations"], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "personalized", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRecommendationsPostsByPostId", "x-rezics-quota-route-operation-id": "getApiRecommendationsPostsByPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/recommendations/events": { "post": { "summary": "Record recommendation events", "tags": ["Recommendations"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["events"], "properties": { "events": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "targetUnitId", "type", "occurredAt", "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "id": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "type": { "default": "impression", "type": "string", "enum": ["impression", "open", "dwell_30s"] }, "occurredAt": { "format": "date-time", "type": "string" }, "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["accepted"], "properties": { "accepted": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRecommendationsEvents", "x-rezics-quota-route-operation-id": "postApiRecommendationsEvents", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/recommendations/exclusions/{unitId}": { "put": { "summary": "Exclude a recommendation", "tags": ["Recommendations"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "eventId", "occurredAt", "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "eventId": { "format": "uuid", "type": "string" }, "occurredAt": { "format": "date-time", "type": "string" }, "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["excluded"], "properties": { "excluded": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRecommendationsExclusionsByUnitId", "x-rezics-quota-route-operation-id": "putApiRecommendationsExclusionsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Restore an excluded recommendation", "tags": ["Recommendations"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["excluded"], "properties": { "excluded": { "type": "boolean" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiRecommendationsExclusionsByUnitId", "x-rezics-quota-route-operation-id": "deleteApiRecommendationsExclusionsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/messages/conversations": { "get": { "summary": "List direct-message conversations", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "otherProfileId", "otherUserName", "lastMessageAt", "lastMessage", "unreadCount", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "otherProfileId": { "format": "uuid", "type": "string" }, "otherUserName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastMessageAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "lastMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "unreadCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidMessageCursor", "type": "string", "enum": ["InvalidMessageCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiMessagesConversations", "x-rezics-quota-route-operation-id": "getApiMessagesConversations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create or find a direct-message conversation", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["participantProfileId"], "properties": { "participantProfileId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DirectMessageBlocked", "type": "string", "enum": ["DirectMessageBlocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ConversationParticipantsInvalid", "type": "string", "enum": ["ConversationParticipantsInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiMessagesConversations", "x-rezics-quota-route-operation-id": "postApiMessagesConversations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/messages/conversations/{conversationId}": { "get": { "summary": "Get direct-message conversation", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "otherProfileId", "otherUserName", "lastMessageAt", "lastMessage", "unreadCount", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "otherProfileId": { "format": "uuid", "type": "string" }, "otherUserName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastMessageAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "lastMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "unreadCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ConversationNotFound", "type": "string", "enum": ["ConversationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiMessagesConversationsByConversationId", "x-rezics-quota-route-operation-id": "getApiMessagesConversationsByConversationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/messages/conversations/{conversationId}/messages": { "get": { "summary": "List direct messages", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "conversationId", "senderProfileId", "content", "deletedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "senderProfileId": { "format": "uuid", "type": "string" }, "content": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "deletedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidMessageCursor", "type": "string", "enum": ["InvalidMessageCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ConversationNotFound", "type": "string", "enum": ["ConversationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiMessagesConversationsByConversationIdMessages", "x-rezics-quota-route-operation-id": "getApiMessagesConversationsByConversationIdMessages", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Send direct message", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["content"], "properties": { "content": { "minLength": 1, "maxLength": 20000, "pattern": ".*\\S.*", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "conversationId", "senderProfileId", "content", "deletedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "conversationId": { "format": "uuid", "type": "string" }, "senderProfileId": { "format": "uuid", "type": "string" }, "content": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "deletedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DirectMessageBlocked", "type": "string", "enum": ["DirectMessageBlocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ConversationNotFound", "type": "string", "enum": ["ConversationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiMessagesConversationsByConversationIdMessages", "x-rezics-quota-route-operation-id": "postApiMessagesConversationsByConversationIdMessages", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/messages/conversations/{conversationId}/read": { "put": { "summary": "Mark direct-message conversation read", "tags": ["Messages"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "conversationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["lastReadMessageId"], "properties": { "lastReadMessageId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["conversationId", "lastReadMessageId", "readAt"], "properties": { "conversationId": { "format": "uuid", "type": "string" }, "lastReadMessageId": { "format": "uuid", "type": "string" }, "readAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ConversationNotFound", "type": "string", "enum": ["ConversationNotFound", "MessageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiMessagesConversationsByConversationIdRead", "x-rezics-quota-route-operation-id": "putApiMessagesConversationsByConversationIdRead", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/messages/{messageId}": { "delete": { "summary": "Delete direct message", "tags": ["Messages"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "MessageNotFound", "type": "string", "enum": ["MessageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "messageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiMessagesByMessageId", "x-rezics-quota-route-operation-id": "deleteApiMessagesByMessageId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-tokens": { "get": { "summary": "List API tokens", "tags": ["API Tokens"], "security": [{ "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["itemLimit", "items"], "properties": { "itemLimit": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "tokenPrefix", "permissions", "enabled", "expiresAt", "lastUsedAt", "createdAt", "updatedAt", "quota" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "lastUsedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": ["account", "token", "tokenOverride"], "properties": { "account": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "token": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "tokenOverride": { "nullable": true, "anyOf": [ { "type": "object", "required": ["configurationOverride", "revision", "updatedAt"], "properties": { "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": [ "requestsPerMinute", "burstCapacity" ], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": [ "requestsPerMinute", "burstCapacity" ], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] } } } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiApi-tokens", "x-rezics-quota-route-operation-id": "getApiApi-tokens", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create API token (secret returned once)", "tags": ["API Tokens"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["name", "permissions"], "properties": { "name": { "minLength": 1, "maxLength": 120, "type": "string" }, "permissions": { "minItems": 1, "maxItems": 18, "uniqueItems": true, "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "expiresInDays": { "minimum": 1, "maximum": 365, "default": 90, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 365, "default": 90, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "name", "tokenPrefix", "permissions", "enabled", "expiresAt", "lastUsedAt", "createdAt", "updatedAt", "quota", "token" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "lastUsedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": ["account", "token", "tokenOverride"], "properties": { "account": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "token": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "tokenOverride": { "nullable": true, "anyOf": [ { "type": "object", "required": ["configurationOverride", "revision", "updatedAt"], "properties": { "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] } } }, "token": { "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenLimitReached", "type": "string", "enum": ["ApiTokenLimitReached"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiApi-tokens", "x-rezics-quota-route-operation-id": "postApiApi-tokens", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-tokens/{tokenId}": { "patch": { "summary": "Update API token", "tags": ["API Tokens"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "minProperties": 1, "type": "object", "properties": { "name": { "minLength": 1, "maxLength": 120, "type": "string" }, "permissions": { "minItems": 1, "maxItems": 18, "uniqueItems": true, "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "expiresInDays": { "minimum": 1, "maximum": 365, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 365, "type": "integer" } ] }, "enabled": { "type": "boolean" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "name", "tokenPrefix", "permissions", "enabled", "expiresAt", "lastUsedAt", "createdAt", "updatedAt", "quota" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "lastUsedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": ["account", "token", "tokenOverride"], "properties": { "account": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "token": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "tokenOverride": { "nullable": true, "anyOf": [ { "type": "object", "required": ["configurationOverride", "revision", "updatedAt"], "properties": { "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenNotFound", "type": "string", "enum": ["ApiTokenNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenLimitReached", "type": "string", "enum": ["ApiTokenLimitReached"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiApi-tokensByTokenId", "x-rezics-quota-route-operation-id": "patchApiApi-tokensByTokenId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Revoke API token", "tags": ["API Tokens"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenNotFound", "type": "string", "enum": ["ApiTokenNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiApi-tokensByTokenId", "x-rezics-quota-route-operation-id": "deleteApiApi-tokensByTokenId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-tokens/{tokenId}/quota-override": { "put": { "summary": "Replace API token quota override", "tags": ["API Tokens"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "configurationOverride"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "name", "tokenPrefix", "permissions", "enabled", "expiresAt", "lastUsedAt", "createdAt", "updatedAt", "quota" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "lastUsedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": ["account", "token", "tokenOverride"], "properties": { "account": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "token": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "tokenOverride": { "nullable": true, "anyOf": [ { "type": "object", "required": ["configurationOverride", "revision", "updatedAt"], "properties": { "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenNotFound", "type": "string", "enum": ["ApiTokenNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenQuotaOverrideRevisionConflict", "type": "string", "enum": ["ApiTokenQuotaOverrideRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenQuotaOverrideInvalid", "type": "string", "enum": ["ApiTokenQuotaOverrideInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiApi-tokensByTokenIdQuota-override", "x-rezics-quota-route-operation-id": "putApiApi-tokensByTokenIdQuota-override", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete API token quota override", "tags": ["API Tokens"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenNotFound", "type": "string", "enum": ["ApiTokenNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenQuotaOverrideRevisionConflict", "type": "string", "enum": ["ApiTokenQuotaOverrideRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision"], "properties": { "expectedRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } } } }, "required": true }, "operationId": "deleteApiApi-tokensByTokenIdQuota-override", "x-rezics-quota-route-operation-id": "deleteApiApi-tokensByTokenIdQuota-override", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/token": { "get": { "operationId": "getCurrentApiToken", "summary": "Inspect the current API token's safe capabilities", "tags": ["API Tokens"], "security": [{ "ApiToken": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "name", "tokenPrefix", "permissions", "enabled", "expiresAt", "createdAt", "quota" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit:read", "type": "string", "enum": [ "unit:read", "unit:create", "unit:update", "profile:read", "profile:update", "interaction:read", "interaction:write", "realm:read", "realm:manage", "message:read", "message:write", "notification:read", "notification:write", "recommendation:read", "recommendation:write", "upload:read", "upload:write", "report:write" ] } }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": ["account", "token", "tokenOverride"], "properties": { "account": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "token": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "tokenOverride": { "nullable": true, "anyOf": [ { "type": "object", "required": ["configurationOverride", "revision", "updatedAt"], "properties": { "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaExceeded", "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiToken", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-quota-policies": { "get": { "summary": "List API quota policies", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "key", "subjectKind", "class", "schemaVersion", "configuration", "revision", "enabled", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "key": { "type": "string" }, "subjectKind": { "default": "account", "type": "string", "enum": ["account", "token"] }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "configuration": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["limits", "maxActiveTokens", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, { "additionalProperties": false, "type": "object", "required": ["limits", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "enabled": { "type": "boolean" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiApi-quota-policies", "x-rezics-quota-route-operation-id": "getApiApi-quota-policies", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create an API quota policy", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["key", "subjectKind", "class", "configuration", "reason"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9_-]{0,63}$", "type": "string" }, "subjectKind": { "default": "account", "type": "string", "enum": ["account", "token"] }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "configuration": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["limits", "maxActiveTokens", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, { "additionalProperties": false, "type": "object", "required": ["limits", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } ] }, "reason": { "minLength": 1, "maxLength": 1000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "key", "subjectKind", "class", "schemaVersion", "configuration", "revision", "enabled", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "key": { "type": "string" }, "subjectKind": { "default": "account", "type": "string", "enum": ["account", "token"] }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "configuration": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["limits", "maxActiveTokens", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, { "additionalProperties": false, "type": "object", "required": ["limits", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "enabled": { "type": "boolean" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyKeyConflict", "type": "string", "enum": ["ApiQuotaPolicyKeyConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyInvalid", "type": "string", "enum": ["ApiQuotaPolicyInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiApi-quota-policies", "x-rezics-quota-route-operation-id": "postApiApi-quota-policies", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-quota-policies/{policyKey}": { "put": { "summary": "Publish an API quota policy revision", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "policyKey", "in": "path", "required": true, "schema": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9_-]{0,63}$", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "configuration", "reason"], "properties": { "expectedRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "configuration": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["limits", "maxActiveTokens", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, { "additionalProperties": false, "type": "object", "required": ["limits", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } ] }, "reason": { "minLength": 1, "maxLength": 1000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "key", "subjectKind", "class", "schemaVersion", "configuration", "revision", "enabled", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "key": { "type": "string" }, "subjectKind": { "default": "account", "type": "string", "enum": ["account", "token"] }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "configuration": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["limits", "maxActiveTokens", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, { "additionalProperties": false, "type": "object", "required": ["limits", "operations"], "properties": { "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "enabled": { "type": "boolean" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyNotFound", "type": "string", "enum": ["ApiQuotaPolicyNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyRevisionConflict", "type": "string", "enum": ["ApiQuotaPolicyRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyInvalid", "type": "string", "enum": ["ApiQuotaPolicyInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiApi-quota-policiesByPolicyKey", "x-rezics-quota-route-operation-id": "putApiApi-quota-policiesByPolicyKey", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-quota-policies/accounts/{userId}": { "get": { "summary": "Get a user's API quota", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-route-operation-id": "getApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Assign a user's API quota policy", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "policyKey", "reason"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "policyKey": { "minLength": 1, "maxLength": 64, "type": "string" }, "validUntil": { "format": "date-time", "type": "string" }, "reason": { "minLength": 1, "maxLength": 1000, "type": "string" }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound", "ApiQuotaPolicyNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiAccountQuotaRevisionConflict", "type": "string", "enum": ["ApiAccountQuotaRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyInvalid", "type": "string", "enum": ["ApiQuotaPolicyInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-route-operation-id": "putApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Reset a user's API quota policy", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision"], "properties": { "expectedRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "maxActiveTokens", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "maxActiveTokens": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxActiveTokens": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiAccountQuotaRevisionConflict", "type": "string", "enum": ["ApiAccountQuotaRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-route-operation-id": "deleteApiApi-quota-policiesAccountsByUserId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-quota-policies/accounts/{userId}/tokens": { "get": { "summary": "List a user's API token quotas", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "tokenPrefix", "enabled", "expiresAt", "lastUsedAt", "createdAt", "updatedAt", "quota" ], "properties": { "id": { "format": "uuid", "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string" }, "enabled": { "type": "boolean" }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "lastUsedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "quota": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": [ "requestRate", "maxConcurrentRequests", "dailyCostUnits" ], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiApi-quota-policiesAccountsByUserIdTokens", "x-rezics-quota-route-operation-id": "getApiApi-quota-policiesAccountsByUserIdTokens", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/api-quota-policies/accounts/{userId}/tokens/{tokenId}": { "put": { "summary": "Assign an API token quota policy", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "policyKey", "reason"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "policyKey": { "minLength": 1, "maxLength": 64, "type": "string" }, "validUntil": { "format": "date-time", "type": "string" }, "reason": { "minLength": 1, "maxLength": 1000, "type": "string" }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound", "ApiQuotaPolicyNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenQuotaRevisionConflict", "type": "string", "enum": ["ApiTokenQuotaRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiQuotaPolicyInvalid", "type": "string", "enum": ["ApiQuotaPolicyInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiApi-quota-policiesAccountsByUserIdTokensByTokenId", "x-rezics-quota-route-operation-id": "putApiApi-quota-policiesAccountsByUserIdTokensByTokenId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Reset an API token quota policy", "tags": ["API Quota Policies"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tokenId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision"], "properties": { "expectedRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "key", "class", "source", "schemaVersion", "policyRevision", "bindingRevision", "validUntil", "assignmentReason", "configurationOverride", "limits", "operations" ], "properties": { "key": { "type": "string" }, "class": { "default": "standard", "type": "string", "enum": ["standard", "privileged"] }, "source": { "default": "assigned", "type": "string", "enum": ["assigned", "standard_default", "privileged_fallback"] }, "schemaVersion": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "policyRevision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "bindingRevision": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "validUntil": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "assignmentReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "configurationOverride": { "additionalProperties": false, "type": "object", "properties": { "limits": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } }, "limits": { "additionalProperties": false, "type": "object", "required": ["requestRate", "maxConcurrentRequests", "dailyCostUnits"], "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "operations": { "type": "object", "properties": { "search.execute": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 }, "image.upload": { "additionalProperties": false, "type": "object", "properties": { "requestRate": { "additionalProperties": false, "type": "object", "required": ["requestsPerMinute", "burstCapacity"], "properties": { "requestsPerMinute": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] }, "burstCapacity": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } } }, "maxConcurrentRequests": { "minimum": 1, "maximum": 1000, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "type": "integer" } ] }, "dailyCostUnits": { "minimum": 1, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 9007199254740991, "type": "integer" } ] } }, "minProperties": 1 } }, "additionalProperties": false } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FreshSessionRequired", "type": "string", "enum": ["FreshSessionRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenQuotaRevisionConflict", "type": "string", "enum": ["ApiTokenQuotaRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiApi-quota-policiesAccountsByUserIdTokensByTokenId", "x-rezics-quota-route-operation-id": "deleteApiApi-quota-policiesAccountsByUserIdTokensByTokenId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/feed/query": { "post": { "summary": "Ranked realm feed", "tags": ["Feed"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "default": "best", "type": "string", "enum": ["best", "new"] }, "cursor": { "maxLength": 1024, "type": "string" }, "limit": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor", "total"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidFeedCursor", "type": "string", "enum": ["InvalidFeedCursor", "InvalidFeedFilter"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiFeedQuery", "x-rezics-quota-route-operation-id": "postApiFeedQuery", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reports/me": { "get": { "summary": "List current user's content reports", "tags": ["Reports"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } }, { "name": "reportId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "status", "target", "rules", "referrals", "details", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "type": "string", "enum": [ "submitted", "reviewing", "completed", "merged", "not_actioned" ] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "kind", "language", "title", "slugAddress"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] }, "rules": { "minItems": 1, "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceRealmId", "revisionId", "language", "title" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } }, "referrals": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "caseId", "scope", "realmId", "caseState", "destinationTitle", "status" ], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["realm", "platform"] }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "destinationTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "type": "string", "enum": [ "submitted", "reviewing", "completed", "merged", "not_actioned" ] } } } }, "details": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReportsMe", "x-rezics-quota-route-operation-id": "getApiReportsMe", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reports/units/{unitId}/destinations": { "get": { "summary": "List the context and official rule sources for a content report", "tags": ["Reports"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "contextRealmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items"], "properties": { "items": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "scope", "language", "title", "revisionId", "rules"], "properties": { "id": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["platform", "realm"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "revisionId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "language", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ReportRealmMismatch", "type": "string", "enum": ["ReportRealmMismatch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReportsUnitsByUnitIdDestinations", "x-rezics-quota-route-operation-id": "getApiReportsUnitsByUnitIdDestinations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/reports": { "get": { "summary": "List content reports referred to a Realm", "tags": ["Reports"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "contextRealmId", "rules", "referrals", "details", "reportedRevisionId", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "contextRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceRealmId", "revisionId", "language", "title" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } }, "referrals": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "caseId", "scope", "realmId", "caseState"], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["realm", "platform"] }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } } } }, "details": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "reportedRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdReports", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdReports", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reports/review-cases/{caseId}": { "get": { "summary": "List reports in one content review case", "tags": ["Reports"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "caseId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "contextRealmId", "rules", "referrals", "details", "reportedRevisionId", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "contextRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceRealmId", "revisionId", "language", "title" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } }, "referrals": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "caseId", "scope", "realmId", "caseState"], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["realm", "platform"] }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } } } }, "details": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "reportedRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReportsReview-casesByCaseId", "x-rezics-quota-route-operation-id": "getApiReportsReview-casesByCaseId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reports/platform/cases": { "get": { "summary": "List platform content review cases", "tags": ["Reports"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "caseId", "caseState", "unitId", "unitKind", "language", "title", "moderationStatus", "postTargetingLocked", "licenseGrants", "reportCount", "allowedCommands", "createdAt", "updatedAt" ], "properties": { "caseId": { "format": "uuid", "type": "string" }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "moderationStatus": { "type": "string", "enum": ["approved", "pending", "removed"] }, "postTargetingLocked": { "type": "boolean" }, "licenseGrants": { "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "recognitionStatus", "offeringEnded" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "minLength": 1, "type": "string" }, "recognitionStatus": { "const": "recognized", "type": "string" }, "offeringEnded": { "const": false, "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "recognitionStatus", "offeringEnded", "invalidationActionId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "minLength": 1, "type": "string" }, "recognitionStatus": { "const": "invalidated", "type": "string" }, "offeringEnded": { "const": false, "type": "boolean" }, "invalidationActionId": { "format": "uuid", "type": "string" } } } ] } }, "reportCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "allowedCommands": { "minItems": 1, "type": "array", "items": { "type": "string", "enum": [ "approve", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "dismiss", "note" ] } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReportsPlatformCases", "x-rezics-quota-route-operation-id": "getApiReportsPlatformCases", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reports/units/{unitId}": { "post": { "summary": "Report content under selected current rules", "tags": ["Reports"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["rules"], "properties": { "contextRealmId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "details": { "minLength": 1, "maxLength": 2000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "contextRealmId", "rules", "referrals", "details", "reportedRevisionId", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "contextRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "sourceRealmId", "revisionId", "language", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } }, "referrals": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "caseId", "scope", "realmId", "caseState"], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["realm", "platform"] }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } } } }, "details": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "reportedRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ReportRealmMismatch", "type": "string", "enum": ["ReportRealmMismatch", "ReportRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ReportAlreadySubmitted", "type": "string", "enum": [ "ReportAlreadySubmitted", "ReportTargetRevisionUnavailable", "ReportRuleUnavailable", "ReportRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiReportsUnitsByUnitId", "x-rezics-quota-route-operation-id": "postApiReportsUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access": { "get": { "summary": "Get Unit access configuration", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "scope", "in": "query", "required": false, "schema": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "unitTitle", "unitKind", "permissions", "authenticatedGrantablePermissions", "owner", "canTransferOwnership", "canRelinquishOwnership", "subjects" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "unitTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "unitKind": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "authenticatedGrantablePermissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "realm.contribute", "realm.units.create", "realm.post.replies.create", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "canTransferOwnership": { "type": "boolean" }, "canRelinquishOwnership": { "type": "boolean" }, "subjects": { "type": "array", "items": { "type": "object", "required": [ "subject", "label", "grants", "restrictions", "inherited", "expiresAt" ], "properties": { "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realmId", "relation"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "relation": { "default": "member", "type": "string", "enum": ["member", "access_manager"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "authenticated", "type": "string" } } } ] }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "grants": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "restrictions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "inherited": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitByUnitIdAccess", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitByUnitIdAccess", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace Unit subject access", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["subject", "grants", "scope", "restrictions", "rules"], "properties": { "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realmId", "relation"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "relation": { "default": "member", "type": "string", "enum": ["member", "access_manager"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "authenticated", "type": "string" } } } ] }, "grants": { "maxItems": 28, "uniqueItems": true, "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "expiresAt": { "format": "date-time", "type": "string" }, "restrictions": { "minItems": 1, "maxItems": 28, "uniqueItems": true, "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } }, { "additionalProperties": false, "type": "object", "required": ["subject", "grants", "scope", "restrictions"], "properties": { "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realmId", "relation"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "relation": { "default": "member", "type": "string", "enum": ["member", "access_manager"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "authenticated", "type": "string" } } } ] }, "grants": { "maxItems": 28, "uniqueItems": true, "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "expiresAt": { "format": "date-time", "type": "string" }, "restrictions": { "maxItems": 0, "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "unitTitle", "unitKind", "permissions", "authenticatedGrantablePermissions", "owner", "canTransferOwnership", "canRelinquishOwnership", "subjects" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "unitTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "unitKind": { "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "authenticatedGrantablePermissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "realm.contribute", "realm.units.create", "realm.post.replies.create", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "canTransferOwnership": { "type": "boolean" }, "canRelinquishOwnership": { "type": "boolean" }, "subjects": { "type": "array", "items": { "type": "object", "required": [ "subject", "label", "grants", "restrictions", "inherited", "expiresAt" ], "properties": { "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realmId", "relation"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "relation": { "default": "member", "type": "string", "enum": ["member", "access_manager"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "authenticated", "type": "string" } } } ] }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "grants": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "restrictions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "inherited": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessExpiryInvalid", "type": "string", "enum": [ "UnitAccessExpiryInvalid", "UnitAccessConfigurationInvalid", "GovernanceRuleSourceForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "FreshSessionRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ProfileNotFound", "RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnerRestrictionForbidden", "type": "string", "enum": ["UnitOwnerRestrictionForbidden", "GovernanceRuleChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiGovernanceUnitByUnitIdAccess", "x-rezics-quota-route-operation-id": "putApiGovernanceUnitByUnitIdAccess", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access-candidates": { "get": { "summary": "Search Unit access candidates", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "query", "required": true, "schema": { "type": "string", "enum": ["profile", "realm"] } }, { "name": "query", "in": "query", "required": false, "schema": { "maxLength": 200, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["subject", "label"], "properties": { "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realmId", "relation"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "relation": { "default": "member", "type": "string", "enum": ["member", "access_manager"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "authenticated", "type": "string" } } } ] }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitByUnitIdAccess-candidates", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitByUnitIdAccess-candidates", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access/effective": { "get": { "summary": "Resolve effective Unit access for the current Profile", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "scope", "in": "query", "required": false, "schema": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["unitId", "scope", "decisions"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "decisions": { "type": "array", "items": { "type": "object", "required": ["permission", "decision"], "properties": { "permission": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.ownership.transfer", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] }, "decision": { "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["allowed", "source"], "properties": { "allowed": { "const": true, "type": "boolean" }, "source": { "anyOf": [ { "const": "public", "type": "string" }, { "const": "platform", "type": "string" }, { "const": "owner", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["allowed", "source", "grantId", "subjectKind"], "properties": { "allowed": { "const": true, "type": "boolean" }, "source": { "const": "grant", "type": "string" }, "grantId": { "format": "uuid", "type": "string" }, "subjectKind": { "anyOf": [ { "const": "profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "authenticated", "type": "string" } ] } } } ] }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["allowed", "reason"], "properties": { "allowed": { "const": false, "type": "boolean" }, "reason": { "anyOf": [ { "const": "missing", "type": "string" }, { "const": "anonymous", "type": "string" }, { "const": "ungranted", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "allowed", "reason", "restrictionId", "subjectKind" ], "properties": { "allowed": { "const": false, "type": "boolean" }, "reason": { "const": "restricted", "type": "string" }, "restrictionId": { "format": "uuid", "type": "string" }, "subjectKind": { "anyOf": [ { "const": "profile", "type": "string" }, { "const": "realm", "type": "string" } ] } } } ] } ] } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitByUnitIdAccessEffective", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitByUnitIdAccessEffective", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/ownership/candidates": { "get": { "summary": "Search eligible Unit ownership recipients", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "query", "in": "query", "required": false, "schema": { "maxLength": 200, "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["profileId", "label", "slug"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitByUnitIdOwnershipCandidates", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitByUnitIdOwnershipCandidates", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/ownership": { "put": { "summary": "Transfer Unit ownership", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedOwnerProfileId", "targetProfileId"], "properties": { "expectedOwnerProfileId": { "format": "uuid", "type": "string" }, "targetProfileId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["owner"], "properties": { "owner": { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipChanged", "type": "string", "enum": ["UnitOwnershipChanged", "UnitOwnershipTargetIneligible"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiGovernanceUnitByUnitIdOwnership", "x-rezics-quota-route-operation-id": "putApiGovernanceUnitByUnitIdOwnership", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/ownership/relinquishment": { "post": { "summary": "Relinquish Unit ownership to Community", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedOwnerProfileId"], "properties": { "expectedOwnerProfileId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["owner"], "properties": { "owner": { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipChanged", "type": "string", "enum": ["UnitOwnershipChanged", "UnitOwnershipRelinquishmentForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceUnitByUnitIdOwnershipRelinquishment", "x-rezics-quota-route-operation-id": "postApiGovernanceUnitByUnitIdOwnershipRelinquishment", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/access-invitations": { "get": { "summary": "List received Unit access invitations", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "includeResolved", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "invitedProfileId", "permissions", "scope", "invitedByProfileId", "expiresAt", "accessExpiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitAccess-invitations", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitAccess-invitations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access-invitations": { "get": { "summary": "List managed Unit access invitations", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "includeResolved", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "invitedProfileId", "permissions", "scope", "invitedByProfileId", "expiresAt", "accessExpiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceUnitByUnitIdAccess-invitations", "x-rezics-quota-route-operation-id": "getApiGovernanceUnitByUnitIdAccess-invitations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Unit access invitation", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["invitedProfileId", "permissions", "scope", "invitationExpiresAt"], "properties": { "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "minItems": 1, "maxItems": 28, "uniqueItems": true, "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitationExpiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "format": "date-time", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "invitedProfileId", "permissions", "scope", "invitedByProfileId", "expiresAt", "accessExpiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessExpiryInvalid", "type": "string", "enum": [ "UnitAccessExpiryInvalid", "UnitAccessInvitationSelfForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationConflict", "type": "string", "enum": ["UnitAccessInvitationConflict", "UnitAccessInvitationExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceUnitByUnitIdAccess-invitations", "x-rezics-quota-route-operation-id": "postApiGovernanceUnitByUnitIdAccess-invitations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access-invitations/{invitationId}/accept": { "post": { "summary": "Accept Unit access invitation", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "invitationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": {} } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "invitedProfileId", "permissions", "scope", "invitedByProfileId", "expiresAt", "accessExpiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationNotFound", "type": "string", "enum": ["UnitAccessInvitationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationConflict", "type": "string", "enum": ["UnitAccessInvitationConflict", "UnitAccessInvitationExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceUnitByUnitIdAccess-invitationsByInvitationIdAccept", "x-rezics-quota-route-operation-id": "postApiGovernanceUnitByUnitIdAccess-invitationsByInvitationIdAccept", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access-invitations/{invitationId}/decline": { "post": { "summary": "Decline Unit access invitation", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "invitationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": {} } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "invitedProfileId", "permissions", "scope", "invitedByProfileId", "expiresAt", "accessExpiresAt", "state", "resolution", "resolvedAt", "resolvedByProfileId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "invitedProfileId": { "format": "uuid", "type": "string" }, "permissions": { "type": "array", "items": { "default": "unit.read", "type": "string", "enum": [ "unit.read", "unit.update", "unit.metadata-only.update", "unit.status.update", "unit.history.restore", "unit.access.manage", "unit.association.manage", "unit.tag-curation.manage", "unit.reference-curation.manage", "unit.realm-publication.manage", "zone.pages.manage", "zone.theme.manage", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate", "entity.association.credit.request", "entity.association.credit.direct", "entity.association.subject.request", "entity.association.subject.direct" ] } }, "scope": { "maxItems": 8, "type": "array", "items": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z0-9][a-z0-9-]*$", "type": "string" } }, "invitedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "accessExpiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "type": "string", "enum": ["pending", "expired", "accepted", "declined", "cancelled"] }, "resolution": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": "accepted", "type": "string" }, { "const": "declined", "type": "string" }, { "const": "cancelled", "type": "string" } ] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationNotFound", "type": "string", "enum": ["UnitAccessInvitationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationConflict", "type": "string", "enum": ["UnitAccessInvitationConflict", "UnitAccessInvitationExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceUnitByUnitIdAccess-invitationsByInvitationIdDecline", "x-rezics-quota-route-operation-id": "postApiGovernanceUnitByUnitIdAccess-invitationsByInvitationIdDecline", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/unit/{unitId}/access-invitations/{invitationId}": { "delete": { "summary": "Cancel Unit access invitation", "tags": ["Governance"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitAccessInvitationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessInvitationConflict", "type": "string", "enum": ["UnitAccessInvitationConflict", "UnitAccessInvitationExpired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "invitationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiGovernanceUnitByUnitIdAccess-invitationsByInvitationId", "x-rezics-quota-route-operation-id": "deleteApiGovernanceUnitByUnitIdAccess-invitationsByInvitationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units": { "get": { "summary": "List Units for platform lifecycle administration", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": ["active", "deleted", "all"] } }, { "name": "query", "in": "query", "required": false, "schema": { "maxLength": 200, "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "title", "status", "owner", "deletedAt", "updatedAt", "protected" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "deletedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "updatedAt": { "format": "date-time", "type": "string" }, "protected": { "type": "boolean" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformUnits", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformUnits", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units/{unitId}": { "get": { "summary": "Get one Unit for platform lifecycle administration", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "kind", "title", "status", "owner", "deletedAt", "updatedAt", "protected" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "deletedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "protected": { "type": "boolean" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformUnitsByUnitId", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units/{unitId}/ownership-candidates": { "get": { "summary": "Search platform Unit ownership override recipients", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "query", "in": "query", "required": false, "schema": { "maxLength": 200, "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["profileId", "label", "slug"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformUnitsByUnitIdOwnership-candidates", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformUnitsByUnitIdOwnership-candidates", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units/{unitId}/ownership-override": { "post": { "summary": "Override Unit ownership through platform governance", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "expectedOwnerProfileId", "targetProfileId", "confirmationUnitId", "rules" ], "properties": { "expectedOwnerProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetProfileId": { "format": "uuid", "type": "string" }, "confirmationUnitId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["owner"], "properties": { "owner": { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipOverrideConfirmationInvalid", "type": "string", "enum": [ "UnitOwnershipOverrideConfirmationInvalid", "GovernanceRuleSourceForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipChanged", "type": "string", "enum": [ "UnitOwnershipChanged", "UnitOwnershipTargetIneligible", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnitsByUnitIdOwnership-override", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnitsByUnitIdOwnership-override", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units/{unitId}/delete": { "post": { "summary": "Soft-delete a Unit from the platform Console", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedUpdatedAt", "confirmationUnitId", "rules"], "properties": { "expectedUpdatedAt": { "format": "date-time", "type": "string" }, "confirmationUnitId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "kind", "title", "status", "owner", "deletedAt", "updatedAt", "protected" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "deletedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "protected": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLifecycleConfirmationInvalid", "type": "string", "enum": [ "UnitLifecycleConfirmationInvalid", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLifecycleChanged", "type": "string", "enum": [ "UnitLifecycleChanged", "UnitLifecycleProtected", "UnitAlreadyDeleted", "UnitNotDeleted", "UnitMergeRequestConflict", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnitsByUnitIdDelete", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnitsByUnitIdDelete", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/units/{unitId}/restore": { "post": { "summary": "Restore a soft-deleted Unit from the platform Console", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedUpdatedAt", "confirmationUnitId"], "properties": { "expectedUpdatedAt": { "format": "date-time", "type": "string" }, "confirmationUnitId": { "format": "uuid", "type": "string" }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "kind", "title", "status", "owner", "deletedAt", "updatedAt", "protected" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "deletedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "protected": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLifecycleConfirmationInvalid", "type": "string", "enum": [ "UnitLifecycleConfirmationInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLifecycleChanged", "type": "string", "enum": [ "UnitLifecycleChanged", "UnitLifecycleProtected", "UnitAlreadyDeleted", "UnitNotDeleted", "UnitMergeRequestConflict", "GovernanceReversalUnavailable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnitsByUnitIdRestore", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnitsByUnitIdRestore", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges": { "get": { "summary": "List Unit merge governance requests", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "targetMainUnitId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "destinationMainUnitId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": [ "pending", "processing", "retry_wait", "completed", "failed" ] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "rejectedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "supersededAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "failedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformUnit-merges", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformUnit-merges", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Propose a reviewed Unit identity merge", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "sourceUnitId", "targetUnitId", "confirmationSourceUnitId", "confirmationTargetUnitId", "expectedSourceUpdatedAt", "expectedTargetUpdatedAt", "idempotencyKey", "rules" ], "properties": { "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "confirmationSourceUnitId": { "format": "uuid", "type": "string" }, "confirmationTargetUnitId": { "format": "uuid", "type": "string" }, "expectedSourceUpdatedAt": { "format": "date-time", "type": "string" }, "expectedTargetUpdatedAt": { "format": "date-time", "type": "string" }, "idempotencyKey": { "minLength": 1, "maxLength": 200, "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": ["pending", "processing", "retry_wait", "completed", "failed"] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "rejectedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "supersededAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "completedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "failedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeConfirmationInvalid", "type": "string", "enum": [ "UnitMergeConfirmationInvalid", "GovernanceRuleSourceForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindMismatch", "type": "string", "enum": [ "UnitMergeKindMismatch", "UnitMergeRequestConflict", "UnitMergeMeasurementConflict", "UnitMergeIdempotencyConflict", "UnitMergeManifestStale", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindIneligible", "type": "string", "enum": ["UnitMergeKindIneligible", "ContentLabelUnitMergeForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnit-merges", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnit-merges", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges/{requestId}": { "get": { "summary": "Get a Unit merge governance request", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "requestId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": ["pending", "processing", "retry_wait", "completed", "failed"] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "rejectedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "supersededAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "completedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "failedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformUnit-mergesByRequestId", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformUnit-mergesByRequestId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges/preflight": { "post": { "summary": "Preflight a Unit identity merge", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["sourceUnitId", "targetUnitId"], "properties": { "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["sourceUnit", "targetUnit", "unitKind", "policy", "manifest"], "properties": { "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindMismatch", "type": "string", "enum": [ "UnitMergeKindMismatch", "UnitMergeRequestConflict", "UnitMergeMeasurementConflict", "UnitMergeIdempotencyConflict", "UnitMergeManifestStale" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindIneligible", "type": "string", "enum": ["UnitMergeKindIneligible", "ContentLabelUnitMergeForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnit-mergesPreflight", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnit-mergesPreflight", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges/direct": { "post": { "summary": "Start a privileged direct Unit identity merge", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "sourceUnitId", "targetUnitId", "confirmationSourceUnitId", "confirmationTargetUnitId", "expectedSourceUpdatedAt", "expectedTargetUpdatedAt", "idempotencyKey", "rules" ], "properties": { "sourceUnitId": { "format": "uuid", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "confirmationSourceUnitId": { "format": "uuid", "type": "string" }, "confirmationTargetUnitId": { "format": "uuid", "type": "string" }, "expectedSourceUpdatedAt": { "format": "date-time", "type": "string" }, "expectedTargetUpdatedAt": { "format": "date-time", "type": "string" }, "idempotencyKey": { "minLength": 1, "maxLength": 200, "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" }, "overrideOfRequestId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": ["pending", "processing", "retry_wait", "completed", "failed"] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "rejectedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "supersededAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "completedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "failedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeConfirmationInvalid", "type": "string", "enum": [ "UnitMergeConfirmationInvalid", "GovernanceRuleSourceForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindMismatch", "type": "string", "enum": [ "UnitMergeKindMismatch", "UnitMergeRequestConflict", "UnitMergeMeasurementConflict", "UnitMergeIdempotencyConflict", "UnitMergeManifestStale", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeKindIneligible", "type": "string", "enum": ["UnitMergeKindIneligible", "ContentLabelUnitMergeForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnit-mergesDirect", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnit-mergesDirect", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges/{requestId}/reviews": { "post": { "summary": "Approve or reject a Unit merge request", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "requestId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["decision", "requestFingerprint"], "properties": { "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "requestFingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": ["pending", "processing", "retry_wait", "completed", "failed"] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "rejectedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "supersededAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "completedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "failedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": [ "PlatformCapabilityRequired", "FreshSessionRequired", "UnitMergeReviewSelfForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeManifestStale", "type": "string", "enum": [ "UnitMergeManifestStale", "UnitMergeRequestConflict", "UnitMergeMeasurementConflict", "UnitMergeReviewDuplicate", "UnitMergeReviewFingerprintMismatch", "UnitMergeRequestNotPending", "UnitMergeRequestExpired", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentLabelUnitMergeForbidden", "type": "string", "enum": ["ContentLabelUnitMergeForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnit-mergesByRequestIdReviews", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnit-mergesByRequestIdReviews", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/unit-merges/{requestId}/retry": { "post": { "summary": "Retry a failed Unit merge operation", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "requestId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "sourceUnit", "targetUnit", "unitKind", "mode", "state", "proposer", "overrideOfRequestId", "rules", "note", "policy", "manifest", "approvals", "rejections", "reviews", "operation", "expiresAt", "acceptedAt", "rejectedAt", "supersededAt", "completedAt", "failedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "targetUnit": { "additionalProperties": false, "type": "object", "required": ["id", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "unitKind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "mode": { "default": "reviewed", "type": "string", "enum": ["reviewed", "privileged_direct"] }, "state": { "default": "pending_review", "type": "string", "enum": [ "pending_review", "accepted", "rejected", "expired", "superseded", "executing", "completed", "failed" ] }, "proposer": { "additionalProperties": false, "type": "object", "required": ["profileId", "label"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "label": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "overrideOfRequestId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "policy": { "additionalProperties": false, "type": "object", "required": [ "version", "requiredApprovals", "vetoEnabled", "selfReviewForbidden" ], "properties": { "version": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "requiredApprovals": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "vetoEnabled": { "type": "boolean" }, "selfReviewForbidden": { "type": "boolean" } } }, "manifest": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceUpdatedAt", "targetUpdatedAt", "sourceGraphRevision", "targetGraphRevision", "graphPlan", "fingerprint" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceUpdatedAt": { "format": "date-time", "type": "string" }, "targetUpdatedAt": { "format": "date-time", "type": "string" }, "sourceGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "targetGraphRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "graphPlan": { "additionalProperties": false, "type": "object", "required": [ "version", "sourceRole", "targetRole", "sourceMainUnitId", "targetMainUnitId", "destinationMainUnitId", "action" ], "properties": { "version": { "const": 1, "type": "number" }, "sourceRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "targetRole": { "default": "standalone", "type": "string", "enum": ["standalone", "variant", "main"] }, "sourceMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "destinationMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "action": { "default": "none", "type": "string", "enum": [ "none", "detach_source", "reparent_source_variants_to_target", "reparent_source_variants_to_target_main", "promote_target_from_source" ] } } }, "fingerprint": { "pattern": "^[a-f0-9]{64}$", "type": "string" } } }, "approvals": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejections": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "reviews": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "reviewerProfileId", "reviewerLabel", "decision", "note", "createdAt" ], "properties": { "reviewerProfileId": { "format": "uuid", "type": "string" }, "reviewerLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "decision": { "default": "approve", "type": "string", "enum": ["approve", "reject"] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "operation": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "state", "phase", "attemptCount", "processedRows", "availableAt", "lastErrorCode", "lastErrorMessage", "startedAt", "completedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "default": "pending", "type": "string", "enum": ["pending", "processing", "retry_wait", "completed", "failed"] }, "phase": { "default": "entity_measurement_preflight", "type": "string", "enum": [ "entity_measurement_preflight", "entity_measurement_entities", "entity_measurement_contexts", "variant_graph", "slug_addresses", "slug_scopes", "aliases", "external_links", "external_link_sources", "software_requirements", "software_requirement_platforms", "unit_reactions", "unit_shares", "unit_follows", "scores", "collection_items", "unit_tags", "realm_tag_judgments", "profile_unit_tags", "realm_pins", "realm_units", "realm_unit_tags", "post_subjects", "association_proposal_sources", "association_proposal_targets", "credit_sources", "credit_targets", "subject_sources", "subject_entities", "release_parents", "series_releases", "poll_options", "content_nodes_content", "content_nodes_target", "tag_path_applications", "progress_entries", "progress_snapshots", "notification_subjects", "derived_state", "finalize" ] }, "attemptCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "processedRows": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "availableAt": { "format": "date-time", "type": "string" }, "lastErrorCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "lastErrorMessage": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "startedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "completedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "expiresAt": { "format": "date-time", "type": "string" }, "acceptedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "rejectedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "supersededAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "completedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "failedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeNotFound", "type": "string", "enum": ["UnitMergeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitMergeRetryUnavailable", "type": "string", "enum": ["UnitMergeRetryUnavailable", "GovernanceRuleChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformUnit-mergesByRequestIdRetry", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformUnit-mergesByRequestIdRetry", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/ownership-claims": { "get": { "summary": "List platform Unit ownership claims", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": ["pending", "approved", "rejected", "withdrawn", "superseded"] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "unitKind", "unitTitle", "ownershipMode", "currentOwnerProfileId", "claimantProfileId", "claimantLabel", "sourceOwnershipId", "details", "state", "resolution", "resolvedAt", "resolvedByProfileId", "resultingOwnershipId", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "unitTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "currentOwnerProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "claimantProfileId": { "format": "uuid", "type": "string" }, "claimantLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "sourceOwnershipId": { "format": "uuid", "type": "string" }, "details": { "type": "string" }, "state": { "type": "string", "enum": ["pending", "approved", "rejected", "withdrawn", "superseded"] }, "resolution": { "nullable": true, "anyOf": [ { "default": "approved", "type": "string", "enum": ["approved", "rejected", "withdrawn", "superseded"] }, { "type": "null" } ] }, "resolvedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "resolvedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "resultingOwnershipId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernancePlatformOwnership-claims", "x-rezics-quota-route-operation-id": "getApiGovernancePlatformOwnership-claims", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/platform/ownership-claims/{claimId}/decision": { "post": { "summary": "Resolve a Unit ownership claim", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "claimId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["decision", "confirmationClaimId", "rules"], "properties": { "decision": { "type": "string", "enum": ["approved", "rejected"] }, "confirmationClaimId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "ownershipId"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "approved", "type": "string" }, "ownershipId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["id", "state", "ownershipId"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "rejected", "type": "string" }, "ownershipId": { "type": "null" } } } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimConfirmationInvalid", "type": "string", "enum": [ "UnitOwnershipClaimConfirmationInvalid", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": [ "PlatformCapabilityRequired", "FreshSessionRequired", "UnitOwnershipClaimSelfDecisionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimNotFound", "type": "string", "enum": ["UnitOwnershipClaimNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitOwnershipClaimChanged", "type": "string", "enum": ["UnitOwnershipClaimChanged", "GovernanceRuleChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernancePlatformOwnership-claimsByClaimIdDecision", "x-rezics-quota-route-operation-id": "postApiGovernancePlatformOwnership-claimsByClaimIdDecision", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/rule-sources": { "get": { "summary": "List current Rule sources for a governance authority", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "authorityKind", "in": "query", "required": true, "schema": { "type": "string", "enum": ["platform", "realm", "zone", "unit"] } }, { "name": "authorityId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "minItems": 1, "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "scope", "language", "title", "revisionId", "rules"], "properties": { "id": { "format": "uuid", "type": "string" }, "scope": { "type": "string", "enum": ["platform", "realm", "local"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "revisionId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "language", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" } } } } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleSourceForbidden", "type": "string", "enum": ["GovernanceRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceRule-sources", "x-rezics-quota-route-operation-id": "getApiGovernanceRule-sources", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/notes/{postId}": { "get": { "summary": "Get governance note", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceNoteNotFound", "type": "string", "enum": ["GovernanceNoteNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceNotesByPostId", "x-rezics-quota-route-operation-id": "getApiGovernanceNotesByPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update governance note", "tags": ["Governance"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["language", "content", "baseRevisionId"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "baseRevisionId": { "format": "uuid", "type": "string" }, "editSummary": { "maxLength": 500, "type": "string" }, "minor": { "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "GovernanceNoteNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiGovernanceNotesByPostId", "x-rezics-quota-route-operation-id": "patchApiGovernanceNotesByPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/content-review/cases": { "get": { "summary": "List content review cases", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "state", "authority", "realmId", "targetUnitId", "assignedProfileId", "duplicateOfCaseId", "notes", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "authority": { "type": "string", "enum": ["platform", "realm"] }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetUnitId": { "format": "uuid", "type": "string" }, "assignedProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "duplicateOfCaseId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "notes": { "type": "array", "items": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceContent-reviewCases", "x-rezics-quota-route-operation-id": "getApiGovernanceContent-reviewCases", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/content-review/cases/{caseId}": { "get": { "summary": "Get content review case", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "caseId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "state", "authority", "realmId", "targetUnitId", "assignedProfileId", "duplicateOfCaseId", "notes", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "authority": { "type": "string", "enum": ["platform", "realm"] }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetUnitId": { "format": "uuid", "type": "string" }, "assignedProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "duplicateOfCaseId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "notes": { "type": "array", "items": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentReviewCaseNotFound", "type": "string", "enum": ["ContentReviewCaseNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiGovernanceContent-reviewCasesByCaseId", "x-rezics-quota-route-operation-id": "getApiGovernanceContent-reviewCasesByCaseId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update content review case", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "caseId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "state": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "assignedProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "duplicateOfCaseId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "internalNote": { "additionalProperties": false, "type": "object", "required": ["language", "content"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "state", "authority", "realmId", "targetUnitId", "assignedProfileId", "duplicateOfCaseId", "notes", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "authority": { "type": "string", "enum": ["platform", "realm"] }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "targetUnitId": { "format": "uuid", "type": "string" }, "assignedProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "duplicateOfCaseId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "notes": { "type": "array", "items": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentReviewCaseNotFound", "type": "string", "enum": ["ContentReviewCaseNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiGovernanceContent-reviewCasesByCaseId", "x-rezics-quota-route-operation-id": "patchApiGovernanceContent-reviewCasesByCaseId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/content-governance/actions": { "post": { "summary": "Apply content governance action", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["caseId", "kind", "rules"], "properties": { "caseId": { "format": "uuid", "type": "string" }, "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "idempotencyKey": { "minLength": 1, "maxLength": 256, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "kind": { "anyOf": [ { "const": "approve", "type": "string" }, { "const": "hide", "type": "string" }, { "const": "remove", "type": "string" }, { "const": "restore", "type": "string" }, { "const": "lock_post_targeting", "type": "string" }, { "const": "unlock_post_targeting", "type": "string" } ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } }, { "additionalProperties": false, "type": "object", "required": ["caseId", "kind", "licenseGrantId", "rules"], "properties": { "caseId": { "format": "uuid", "type": "string" }, "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "idempotencyKey": { "minLength": 1, "maxLength": 256, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "kind": { "const": "invalidate_license", "type": "string" }, "licenseGrantId": { "format": "uuid", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } }, { "additionalProperties": false, "type": "object", "required": ["caseId", "kind", "reversesActionId"], "properties": { "caseId": { "format": "uuid", "type": "string" }, "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "idempotencyKey": { "minLength": 1, "maxLength": 256, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "kind": { "const": "restore_license", "type": "string" }, "reversesActionId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["caseId", "kind", "reversesActionId"], "properties": { "caseId": { "format": "uuid", "type": "string" }, "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "idempotencyKey": { "minLength": 1, "maxLength": 256, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "kind": { "const": "reverse", "type": "string" }, "reversesActionId": { "format": "uuid", "type": "string" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "caseId", "actorProfileId", "kind", "previousState", "resultingState", "previousPostTargetingLocked", "licenseGrantId", "previousRecognitionStatus", "resultingRecognitionStatus", "resultingPostTargetingLocked", "reversesActionId", "rules", "notes", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "actorProfileId": { "format": "uuid", "type": "string" }, "kind": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "previousState": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "resultingState": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "previousPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "licenseGrantId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "previousRecognitionStatus": { "nullable": true, "anyOf": [ { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] }, { "type": "null" } ] }, "resultingRecognitionStatus": { "nullable": true, "anyOf": [ { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] }, { "type": "null" } ] }, "resultingPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "reversesActionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "notes": { "type": "array", "items": { "type": "object", "required": ["postId", "role"], "properties": { "postId": { "format": "uuid", "type": "string" }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] } } } }, "createdAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentGovernanceReversedActionInvalid", "type": "string", "enum": [ "ContentGovernanceReversedActionInvalid", "ContentGovernanceActionIncompatible", "GovernanceNoteRoleDuplicate", "ContentReviewRealmMissing", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentReviewCaseNotFound", "type": "string", "enum": ["ContentReviewCaseNotFound", "ContentGovernanceTargetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentGovernanceTransitionInvalid", "type": "string", "enum": [ "ContentGovernanceTransitionInvalid", "ContentGovernanceActionNoEffect", "ContentGovernanceReversalUnavailable", "GovernanceReversalUnavailable", "ContentGovernanceIdempotencyConflict", "GovernanceRuleChanged", "PostTargetingLocked" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceContent-governanceActions", "x-rezics-quota-route-operation-id": "postApiGovernanceContent-governanceActions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/account-enforcements": { "post": { "summary": "Create account enforcement", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["profileId", "kind", "rules"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "warning", "silence", "suspension", "ban", "rate_limit", "trust_restriction" ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "type": "string", "enum": ["internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "expiresAt": { "format": "date-time", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "profileId", "kind", "active", "startsAt", "expiresAt", "decisionActionId", "revocationActionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "active": { "type": "boolean" }, "startsAt": { "format": "date-time", "type": "string" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "decisionActionId": { "format": "uuid", "type": "string" }, "revocationActionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "EnforcementExpiryInvalid", "type": "string", "enum": [ "EnforcementExpiryInvalid", "GovernanceNoteRoleDuplicate", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileNotFound", "type": "string", "enum": ["ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleChanged", "type": "string", "enum": ["GovernanceRuleChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceAccount-enforcements", "x-rezics-quota-route-operation-id": "postApiGovernanceAccount-enforcements", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/governance/account-enforcements/{enforcementId}/revoke": { "post": { "summary": "Revoke account enforcement", "tags": ["Governance"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "enforcementId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "notes": { "maxItems": 2, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "type": "string", "enum": ["internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "profileId", "kind", "active", "startsAt", "expiresAt", "decisionActionId", "revocationActionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "active": { "type": "boolean" }, "startsAt": { "format": "date-time", "type": "string" }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "decisionActionId": { "format": "uuid", "type": "string" }, "revocationActionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceNoteRoleDuplicate", "type": "string", "enum": [ "GovernanceNoteRoleDuplicate", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "EnforcementNotFound", "type": "string", "enum": ["EnforcementNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "EnforcementAlreadyRevoked", "type": "string", "enum": [ "EnforcementAlreadyRevoked", "EnforcementChanged", "GovernanceReversalUnavailable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiGovernanceAccount-enforcementsByEnforcementIdRevoke", "x-rezics-quota-route-operation-id": "postApiGovernanceAccount-enforcementsByEnforcementIdRevoke", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/audit/events": { "get": { "summary": "List global security audit events", "tags": ["Audit"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 500, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } }, { "name": "category", "in": "query", "required": false, "schema": { "default": "admin_activity", "type": "string", "enum": ["admin_activity", "policy_denied", "system_event"] } }, { "name": "outcome", "in": "query", "required": false, "schema": { "default": "succeeded", "type": "string", "enum": ["succeeded", "denied", "failed"] } }, { "name": "action", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 200, "type": "string" } }, { "name": "actorProfileId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "authorityKind", "in": "query", "required": false, "schema": { "default": "platform", "type": "string", "enum": ["platform", "realm", "zone", "unit"] } }, { "name": "authorityId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "targetId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "schemaVersion", "category", "outcome", "actor", "authority", "action", "outcomeCode", "governanceDecisionId", "requestId", "traceId", "target", "details", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "schemaVersion": { "const": 2, "type": "number" }, "category": { "default": "admin_activity", "type": "string", "enum": ["admin_activity", "policy_denied", "system_event"] }, "outcome": { "default": "succeeded", "type": "string", "enum": ["succeeded", "denied", "failed"] }, "actor": { "type": "object", "required": [ "kind", "profileId", "profileName", "credentialKind", "credentialId" ], "properties": { "kind": { "default": "profile", "type": "string", "enum": ["profile", "system"] }, "profileId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "profileName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "credentialKind": { "default": "session", "type": "string", "enum": ["session", "api_token", "bootstrap", "system"] }, "credentialId": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "authority": { "type": "object", "required": ["kind", "id"], "properties": { "kind": { "default": "platform", "type": "string", "enum": ["platform", "realm", "zone", "unit"] }, "id": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, "action": { "type": "string" }, "outcomeCode": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "governanceDecisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "requestId": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "traceId": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "target": { "nullable": true, "anyOf": [ { "type": "object", "required": ["kind", "id", "path", "name"], "properties": { "kind": { "type": "string" }, "id": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "path": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] }, "details": { "nullable": true, "anyOf": [ { "type": "object", "patternProperties": { "^(.*)$": {} } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiAuditEvents", "x-rezics-quota-route-operation-id": "getApiAuditEvents", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/series": { "post": { "summary": "Create Series", "tags": ["Series"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["kind", "licenses", "localization"], "properties": { "kind": { "minLength": 1, "maxLength": 64, "type": "string" }, "licenses": { "uniqueItems": true, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiSeries", "x-rezics-quota-route-operation-id": "postApiSeries", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/series/{seriesId}/releases": { "get": { "summary": "List Series releases", "tags": ["Series"], "parameters": [ { "name": "seriesId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "allOf": [ { "type": "object", "required": [ "seriesId", "releaseUnitId", "position", "releasedOn", "createdAt", "updatedAt" ], "properties": { "seriesId": { "format": "uuid", "type": "string" }, "releaseUnitId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "object", "required": ["release"], "properties": { "release": { "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiSeriesBySeriesIdReleases", "x-rezics-quota-route-operation-id": "getApiSeriesBySeriesIdReleases", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/slug-address": { "put": { "operationId": "replaceZoneSlugAddress", "summary": "Replace a Zone slug address", "description": "Development preview. Assigns or renames a Zone's optional public slug in the permanent zones namespace. The former address is retained as a redirect.", "tags": ["Zones", "Slug Addresses"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["slug"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "addressId", "unitId", "scopeUnitId", "slug", "redirectAddressId", "canonicalPath" ], "properties": { "addressId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "redirectAddressId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": ["SlugTaken", "SlugScopeUnavailable", "SlugScopeCycle"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugDepthExceeded", "type": "string", "enum": ["SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "putApiZonesByZoneIdSlug-address", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}": { "get": { "summary": "Get Zone configuration", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "slugAddress", "language", "avatar", "banner", "cover", "localizations", "filterDocument", "themeDocument", "themeHero", "startsAt", "endsAt", "localRuleRealmId", "capabilities", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "themeDocument": { "$ref": "#/components/schemas/ZoneThemeDocument" }, "themeHero": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "startsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "endsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "localRuleRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "capabilities": { "additionalProperties": false, "type": "object", "required": ["canManage", "canManageTheme", "hasDevelopmentPreviewAccess"], "properties": { "canManage": { "type": "boolean" }, "canManageTheme": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZonesByZoneId", "x-rezics-quota-route-operation-id": "getApiZonesByZoneId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update Zone configuration", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "themeDocument": { "$ref": "#/components/schemas/ZoneThemeDocument" }, "startsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "endsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "localRuleRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "slugAddress", "language", "avatar", "banner", "cover", "localizations", "filterDocument", "themeDocument", "themeHero", "startsAt", "endsAt", "localRuleRealmId", "capabilities", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "themeDocument": { "$ref": "#/components/schemas/ZoneThemeDocument" }, "themeHero": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "startsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "endsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "localRuleRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "capabilities": { "additionalProperties": false, "type": "object", "required": ["canManage", "canManageTheme", "hasDevelopmentPreviewAccess"], "properties": { "canManage": { "type": "boolean" }, "canManageTheme": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneDocumentInvalid", "type": "string", "enum": [ "ZoneDocumentInvalid", "ZoneRuleRealmInvalid", "ZoneTimeRangeInvalid", "ZoneThemeReferenceInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiZonesByZoneId", "x-rezics-quota-route-operation-id": "patchApiZonesByZoneId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/render": { "get": { "operationId": "getZoneRenderProjection", "summary": "Get a Zone render projection", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "page", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 100, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "type": "string" } }, { "name": "pageId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "postId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "zone", "customThemeStylesheet", "page", "dock", "navigations", "references" ], "properties": { "zone": { "type": "object", "required": [ "id", "slugAddress", "language", "avatar", "banner", "cover", "localizations", "filterDocument", "themeDocument", "themeHero", "startsAt", "endsAt", "localRuleRealmId", "capabilities", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "language", "title", "summary", "avatar", "banner", "cover" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "themeDocument": { "$ref": "#/components/schemas/ZoneThemeDocument" }, "themeHero": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "startsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "endsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "localRuleRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "capabilities": { "additionalProperties": false, "type": "object", "required": [ "canManage", "canManageTheme", "hasDevelopmentPreviewAccess" ], "properties": { "canManage": { "type": "boolean" }, "canManageTheme": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "customThemeStylesheet": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["revisionId", "sha256", "css"], "properties": { "revisionId": { "format": "uuid", "type": "string" }, "sha256": { "type": "string" }, "css": { "maxLength": 65536, "type": "string" } } }, { "type": "null" } ] }, "page": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "dock": { "nullable": true, "anyOf": [ { "type": "object", "required": ["unitId", "surface", "document"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "surface": { "const": "main", "type": "string" }, "document": { "$ref": "#/components/schemas/DockDocument" } } }, { "type": "null" } ] }, "navigations": { "type": "array", "items": { "type": "object", "required": [ "id", "zoneId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "references": { "type": "object", "required": ["units", "wikiPosts", "assets"], "properties": { "units": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "zonePageSlug", "language", "title", "summary", "avatar", "banner", "cover" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "zonePageSlug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "wikiPosts": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "zonePageSlug", "language", "title", "summary", "avatar", "banner", "cover", "body" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "zonePageSlug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "body": { "$ref": "#/components/schemas/PortableTextDocument" } } } }, "assets": { "type": "array", "items": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdRender", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/page-addresses/by-id/{pageId}": { "get": { "operationId": "getZonePageAddressById", "summary": "Get one bounded Zone Page address projection by Unit ID", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["id", "zoneId", "slug", "redirected"], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, { "type": "null" } ] }, "redirected": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdPage-addressesBy-idByPageId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/page-addresses/by-slug/{slug}": { "get": { "operationId": "resolveZonePageAddressBySlug", "summary": "Resolve one bounded Zone Page address by scoped slug", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "slug", "in": "path", "required": true, "schema": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["id", "zoneId", "slug", "redirected"], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, { "type": "null" } ] }, "redirected": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdPage-addressesBy-slugBySlug", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/pages": { "get": { "summary": "List Zone pages", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "pageStructure"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "pageStructure": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "latestRevisionId"], "properties": { "id": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZonesByZoneIdPages", "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdPages", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Zone page in development preview", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["localization"], "properties": { "slug": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, { "type": "null" } ] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title", "document"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" } } }, "baseUnitRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": [ "InvalidSlug", "ZoneDocumentInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": ["SlugTaken", "UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZonesByZoneIdPages", "x-rezics-quota-route-operation-id": "postApiZonesByZoneIdPages", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/pages/{pageId}": { "get": { "summary": "Get Zone page by Unit ID", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZonesByZoneIdPagesByPageId", "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdPagesByPageId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace Zone page in development preview", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["localization"], "properties": { "slug": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, { "type": "null" } ] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title", "document"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" } } }, "baseUnitRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": [ "InvalidSlug", "ZoneDocumentInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": ["SlugTaken", "UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiZonesByZoneIdPagesByPageId", "x-rezics-quota-route-operation-id": "putApiZonesByZoneIdPagesByPageId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/pages/{pageId}/placement": { "put": { "summary": "Index Zone page in page-structure", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "baseStructureRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "slug", "document", "home", "placement", "language", "title", "localizations", "latestUnitRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "slug": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "home": { "type": "boolean" }, "placement": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "structureId", "nodeId", "parentPageId", "position", "latestStructureRevisionId" ], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentPageId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "latestStructureRevisionId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "document", "contentStatus"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "document": { "$ref": "#/components/schemas/UnitReferencedBlockDocument" }, "contentStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] } } } }, "latestUnitRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiZonesByZoneIdPagesByPageIdPlacement", "x-rezics-quota-route-operation-id": "putApiZonesByZoneIdPagesByPageIdPlacement", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Zone page from page-structure", "tags": ["Zones"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZonePageInUse", "type": "string", "enum": ["ZonePageInUse", "ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseStructureRevisionId"], "properties": { "baseStructureRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "operationId": "deleteApiZonesByZoneIdPagesByPageIdPlacement", "x-rezics-quota-route-operation-id": "deleteApiZonesByZoneIdPagesByPageIdPlacement", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/navigation": { "get": { "summary": "List Zone navigation resources", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "zoneId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZonesByZoneIdNavigation", "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdNavigation", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Zone navigation", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["document"], "properties": { "document": { "$ref": "#/components/schemas/NavigationDocument" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneDocumentInvalid", "type": "string", "enum": ["ZoneDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZonesByZoneIdNavigation", "x-rezics-quota-route-operation-id": "postApiZonesByZoneIdNavigation", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones/{zoneId}/navigation/{navigationId}": { "get": { "summary": "Get Zone navigation resource", "tags": ["Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZoneNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-route-operation-id": "getApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace Zone navigation", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["document", "baseRevisionId"], "properties": { "document": { "$ref": "#/components/schemas/NavigationDocument" }, "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "zoneId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneDocumentInvalid", "type": "string", "enum": ["ZoneDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZoneNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-route-operation-id": "putApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete Zone navigation resource", "tags": ["Zones"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZoneNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneNavigationInUse", "type": "string", "enum": ["ZoneNavigationInUse", "ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "operationId": "deleteApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-route-operation-id": "deleteApiZonesByZoneIdNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/series/{seriesId}/releases/{releaseId}": { "put": { "summary": "Add or update Series release", "tags": ["Series"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "seriesId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "releaseId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["position"], "properties": { "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "seriesId", "releaseUnitId", "position", "releasedOn", "createdAt", "updatedAt" ], "properties": { "seriesId": { "format": "uuid", "type": "string" }, "releaseUnitId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiSeriesBySeriesIdReleasesByReleaseId", "x-rezics-quota-route-operation-id": "putApiSeriesBySeriesIdReleasesByReleaseId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Series release", "tags": ["Series"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SeriesReleaseNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "seriesId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "releaseId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiSeriesBySeriesIdReleasesByReleaseId", "x-rezics-quota-route-operation-id": "deleteApiSeriesBySeriesIdReleasesByReleaseId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zones": { "post": { "summary": "Create Zone", "tags": ["Zones"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["localization", "filterDocument", "themeDocument"], "properties": { "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "themeDocument": { "$ref": "#/components/schemas/ZoneThemeDocument" }, "startsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "endsAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "localRuleRealmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneDocumentInvalid", "type": "string", "enum": [ "ZoneDocumentInvalid", "ZoneRuleRealmInvalid", "ZoneTimeRangeInvalid", "ZoneThemeReferenceInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZones", "x-rezics-quota-route-operation-id": "postApiZones", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/software/{softwareId}/system-requirements": { "get": { "summary": "List Software system requirements", "tags": ["Software"], "parameters": [ { "name": "softwareId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "softwareId", "platformEntityId", "tier", "sourceExternalLinkId", "hardware", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "softwareId": { "format": "uuid", "type": "string" }, "platformEntityId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "tier": { "type": "string" }, "sourceExternalLinkId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hardware": { "type": "object", "patternProperties": { "^(.*)$": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiSoftwareBySoftwareIdSystem-requirements", "x-rezics-quota-route-operation-id": "getApiSoftwareBySoftwareIdSystem-requirements", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Software system requirement", "tags": ["Software"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "softwareId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["tier", "hardware"], "properties": { "platformEntityId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "tier": { "minLength": 1, "maxLength": 32, "type": "string" }, "sourceExternalLinkId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hardware": { "type": "object", "patternProperties": { "^(.*)$": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "softwareId", "platformEntityId", "tier", "sourceExternalLinkId", "hardware", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "softwareId": { "format": "uuid", "type": "string" }, "platformEntityId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "tier": { "type": "string" }, "sourceExternalLinkId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hardware": { "type": "object", "patternProperties": { "^(.*)$": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SoftwareSystemRequirementSourceInvalid", "type": "string", "enum": [ "SoftwareSystemRequirementSourceInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SoftwareNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiSoftwareBySoftwareIdSystem-requirements", "x-rezics-quota-route-operation-id": "postApiSoftwareBySoftwareIdSystem-requirements", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/software/{softwareId}/system-requirements/{requirementId}": { "put": { "summary": "Replace Software system requirement", "tags": ["Software"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "softwareId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "requirementId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["tier", "hardware"], "properties": { "platformEntityId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "tier": { "minLength": 1, "maxLength": 32, "type": "string" }, "sourceExternalLinkId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hardware": { "type": "object", "patternProperties": { "^(.*)$": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "softwareId", "platformEntityId", "tier", "sourceExternalLinkId", "hardware", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "softwareId": { "format": "uuid", "type": "string" }, "platformEntityId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "tier": { "type": "string" }, "sourceExternalLinkId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hardware": { "type": "object", "patternProperties": { "^(.*)$": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SoftwareSystemRequirementSourceInvalid", "type": "string", "enum": [ "SoftwareSystemRequirementSourceInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SystemRequirementNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiSoftwareBySoftwareIdSystem-requirementsByRequirementId", "x-rezics-quota-route-operation-id": "putApiSoftwareBySoftwareIdSystem-requirementsByRequirementId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete Software system requirement", "tags": ["Software"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SystemRequirementNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "softwareId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "requirementId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiSoftwareBySoftwareIdSystem-requirementsByRequirementId", "x-rezics-quota-route-operation-id": "deleteApiSoftwareBySoftwareIdSystem-requirementsByRequirementId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/docks": { "get": { "summary": "List configured Unit Docks", "tags": ["Docks"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "kind", "latestRevisionId", "document", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": ["main", "wiki"] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/DockDocument" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdDocks", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdDocks", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/docks/{kind}": { "get": { "summary": "Get a Unit Dock", "tags": ["Docks"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "type": "string", "enum": ["main", "wiki"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "kind", "latestRevisionId", "document", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": ["main", "wiki"] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/DockDocument" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Create or replace a Unit Dock", "tags": ["Docks"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "type": "string", "enum": ["main", "wiki"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["document"], "properties": { "document": { "$ref": "#/components/schemas/DockDocument" }, "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "kind", "latestRevisionId", "document", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": ["main", "wiki"] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/DockDocument" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported", "DockDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockRevisionConflict", "type": "string", "enum": ["DockRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-route-operation-id": "putApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete a Unit Dock", "tags": ["Docks"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockRevisionConflict", "type": "string", "enum": ["DockRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "type": "string", "enum": ["main", "wiki"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "operationId": "deleteApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-route-operation-id": "deleteApiUnitsBy-idByUnitIdDocksByKind", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/docks/{kind}/revisions": { "get": { "summary": "List Dock revisions", "tags": ["Docks"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "type": "string", "enum": ["main", "wiki"] } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentRevisionId", "sourceRevisionId", "actorProfileId", "kind", "editSummary", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "sourceRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "kind": { "default": "create", "type": "string", "enum": ["create", "update", "delete", "restore"] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdDocksByKindRevisions", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdDocksByKindRevisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/docks/{kind}/revisions/{revisionId}/restore": { "post": { "summary": "Restore a Dock revision", "tags": ["Docks"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "type": "string", "enum": ["main", "wiki"] } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "latestRevisionId"], "properties": { "updated": { "const": true, "type": "boolean" }, "latestRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockNotSupported", "type": "string", "enum": ["DockNotSupported", "DockDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "DockRevisionConflict", "type": "string", "enum": ["DockRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBy-idByUnitIdDocksByKindRevisionsByRevisionIdRestore", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdDocksByKindRevisionsByRevisionIdRestore", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me": { "get": { "summary": "Current user profile", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "type": "object", "required": [ "id", "slugAddress", "status", "visibility", "language", "name", "avatar", "banner", "summary", "description", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "viewerFollowing": { "type": "boolean" } } }, { "type": "object", "required": [ "email", "emailVerified", "onboarding", "localizations", "platformCapabilities" ], "properties": { "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "onboarding": { "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "platformCapabilities": { "uniqueItems": true, "type": "array", "items": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] } } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileNotFound", "type": "string", "enum": ["ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMe", "x-rezics-quota-route-operation-id": "getApiUsersMe", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update current profile", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["updatedAt", "language"], "properties": { "updatedAt": { "format": "date-time", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "name": { "minLength": 1, "maxLength": 120, "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "summary": { "maxLength": 500, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "slugAddress", "status", "visibility", "language", "name", "avatar", "banner", "summary", "description", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "viewerFollowing": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileNotFound", "type": "string", "enum": ["ProfileNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileChanged", "type": "string", "enum": ["ProfileChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUsersMe", "x-rezics-quota-route-operation-id": "patchApiUsersMe", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/profile-slug": { "put": { "operationId": "assignCurrentProfileSlug", "summary": "Assign the current Profile slug once", "description": "Temporary first-party endpoint. An interactive signed-in user may assign their own Profile slug once without an additional permission. Reserved labels are rejected, and only an idempotent repeat is accepted after assignment.", "tags": ["Users", "First-party Preview"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["slug"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileSlugChangeUnavailable", "type": "string", "enum": ["ProfileSlugChangeUnavailable", "SlugTaken"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugReserved", "type": "string", "enum": ["SlugReserved", "SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "putApiUsersMeProfile-slug", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/studio": { "get": { "operationId": "listCurrentUserStudioContent", "summary": "List current user's actionable Studio workspace resources", "tags": ["Users", "Studio"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "section", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "book", "software", "media", "entity", "tag", "realm", "zone", "post", "wiki", "collection", "review", "poll" ] } }, { "name": "source", "in": "query", "required": false, "schema": { "default": "all", "type": "string", "enum": ["all", "owned", "direct", "delegated"] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["draft", "published", "archived"] } }, { "name": "visibility", "in": "query", "required": false, "schema": { "type": "string", "enum": ["public", "unlisted", "private"] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "section", "language", "title", "cover", "status", "visibility", "accessSources", "assignedAt", "lastVisitedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "section": { "type": "string", "enum": [ "book", "software", "media", "entity", "tag", "realm", "zone", "post", "wiki", "collection", "review", "poll" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "visibility": { "default": "public", "type": "string", "enum": ["public", "unlisted", "private"] }, "accessSources": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["owner", "direct", "realm"] } }, "assignedAt": { "format": "date-time", "type": "string" }, "lastVisitedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "StudioRealmSubjectLimitExceeded", "type": "string", "enum": ["StudioRealmSubjectLimitExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiUsersMeStudio", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/studio/{unitId}/visit": { "put": { "operationId": "recordCurrentUserStudioVisit", "summary": "Record a Studio resource visit", "tags": ["Users", "Studio"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["unitId", "lastVisitedAt"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "lastVisitedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "putApiUsersMeStudioByUnitIdVisit", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/preferences": { "get": { "summary": "Current user preferences", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "profileId", "interfaceLocale", "chineseContentDisplay", "defaultLicenses", "defaultRealmManageMode", "defaultScoreRealmId", "scoreVisibility", "progressVisibility", "collectionConfig", "personalizedFeed", "customZoneThemesEnabled", "filterFeedByPreferredLanguages", "alwaysShowSpoilers", "alwaysShowNsfw", "contentRatings", "preferredLanguages" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "interfaceLocale": { "type": "string", "enum": ["en", "zh-Hant", "zh-Hans", "ja", "ko", "de", "fr", "es"] }, "chineseContentDisplay": { "type": "string", "enum": ["original", "hant", "hans"] }, "defaultLicenses": { "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "defaultRealmManageMode": { "type": "boolean" }, "defaultScoreRealmId": { "format": "uuid", "type": "string" }, "scoreVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "progressVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "collectionConfig": { "nullable": true, "anyOf": [ { "additionalProperties": false, "minProperties": 1, "type": "object", "required": ["version"], "properties": { "version": { "const": 1, "type": "number" }, "view": { "default": "grid", "type": "string", "enum": ["grid", "list"] }, "addMainWithVariantByDefault": { "type": "boolean" } } }, { "type": "null" } ] }, "personalizedFeed": { "type": "boolean" }, "customZoneThemesEnabled": { "type": "boolean" }, "filterFeedByPreferredLanguages": { "type": "boolean" }, "alwaysShowSpoilers": { "type": "boolean" }, "alwaysShowNsfw": { "type": "boolean" }, "contentRatings": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] } }, "preferredLanguages": { "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PreferencesNotFound", "type": "string", "enum": ["PreferencesNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMePreferences", "x-rezics-quota-route-operation-id": "getApiUsersMePreferences", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update current user display preferences", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "minProperties": 1, "type": "object", "properties": { "interfaceLocale": { "type": "string", "enum": ["en", "zh-Hant", "zh-Hans", "ja", "ko", "de", "fr", "es"] }, "chineseContentDisplay": { "type": "string", "enum": ["original", "hant", "hans"] }, "alwaysShowSpoilers": { "type": "boolean" }, "alwaysShowNsfw": { "type": "boolean" }, "customZoneThemesEnabled": { "type": "boolean" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "profileId", "interfaceLocale", "chineseContentDisplay", "defaultLicenses", "defaultRealmManageMode", "defaultScoreRealmId", "scoreVisibility", "progressVisibility", "collectionConfig", "personalizedFeed", "customZoneThemesEnabled", "filterFeedByPreferredLanguages", "alwaysShowSpoilers", "alwaysShowNsfw", "contentRatings", "preferredLanguages" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "interfaceLocale": { "type": "string", "enum": ["en", "zh-Hant", "zh-Hans", "ja", "ko", "de", "fr", "es"] }, "chineseContentDisplay": { "type": "string", "enum": ["original", "hant", "hans"] }, "defaultLicenses": { "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "defaultRealmManageMode": { "type": "boolean" }, "defaultScoreRealmId": { "format": "uuid", "type": "string" }, "scoreVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "progressVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "collectionConfig": { "nullable": true, "anyOf": [ { "additionalProperties": false, "minProperties": 1, "type": "object", "required": ["version"], "properties": { "version": { "const": 1, "type": "number" }, "view": { "default": "grid", "type": "string", "enum": ["grid", "list"] }, "addMainWithVariantByDefault": { "type": "boolean" } } }, { "type": "null" } ] }, "personalizedFeed": { "type": "boolean" }, "customZoneThemesEnabled": { "type": "boolean" }, "filterFeedByPreferredLanguages": { "type": "boolean" }, "alwaysShowSpoilers": { "type": "boolean" }, "alwaysShowNsfw": { "type": "boolean" }, "contentRatings": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] } }, "preferredLanguages": { "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PreferencesNotFound", "type": "string", "enum": ["PreferencesNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUsersMePreferences", "x-rezics-quota-route-operation-id": "patchApiUsersMePreferences", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace current user preferences", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "interfaceLocale", "chineseContentDisplay", "defaultLicenses", "defaultRealmManageMode", "defaultScoreRealmId", "collectionConfig", "personalizedFeed", "customZoneThemesEnabled", "filterFeedByPreferredLanguages", "alwaysShowSpoilers", "alwaysShowNsfw", "contentRatings", "preferredLanguages" ], "properties": { "interfaceLocale": { "type": "string", "enum": ["en", "zh-Hant", "zh-Hans", "ja", "ko", "de", "fr", "es"] }, "chineseContentDisplay": { "type": "string", "enum": ["original", "hant", "hans"] }, "defaultLicenses": { "uniqueItems": true, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "defaultRealmManageMode": { "default": false, "type": "boolean" }, "defaultScoreRealmId": { "format": "uuid", "type": "string" }, "collectionConfig": { "nullable": true, "anyOf": [ { "additionalProperties": false, "minProperties": 1, "type": "object", "required": ["version"], "properties": { "version": { "const": 1, "type": "number" }, "view": { "default": "grid", "type": "string", "enum": ["grid", "list"] }, "addMainWithVariantByDefault": { "type": "boolean" } } }, { "type": "null" } ] }, "personalizedFeed": { "default": true, "type": "boolean" }, "customZoneThemesEnabled": { "default": true, "type": "boolean" }, "filterFeedByPreferredLanguages": { "default": false, "type": "boolean" }, "alwaysShowSpoilers": { "default": false, "type": "boolean" }, "alwaysShowNsfw": { "default": false, "type": "boolean" }, "contentRatings": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] } }, "preferredLanguages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "profileId", "interfaceLocale", "chineseContentDisplay", "defaultLicenses", "defaultRealmManageMode", "defaultScoreRealmId", "scoreVisibility", "progressVisibility", "collectionConfig", "personalizedFeed", "customZoneThemesEnabled", "filterFeedByPreferredLanguages", "alwaysShowSpoilers", "alwaysShowNsfw", "contentRatings", "preferredLanguages" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "interfaceLocale": { "type": "string", "enum": ["en", "zh-Hant", "zh-Hans", "ja", "ko", "de", "fr", "es"] }, "chineseContentDisplay": { "type": "string", "enum": ["original", "hant", "hans"] }, "defaultLicenses": { "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "defaultRealmManageMode": { "type": "boolean" }, "defaultScoreRealmId": { "format": "uuid", "type": "string" }, "scoreVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "progressVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "collectionConfig": { "nullable": true, "anyOf": [ { "additionalProperties": false, "minProperties": 1, "type": "object", "required": ["version"], "properties": { "version": { "const": 1, "type": "number" }, "view": { "default": "grid", "type": "string", "enum": ["grid", "list"] }, "addMainWithVariantByDefault": { "type": "boolean" } } }, { "type": "null" } ] }, "personalizedFeed": { "type": "boolean" }, "customZoneThemesEnabled": { "type": "boolean" }, "filterFeedByPreferredLanguages": { "type": "boolean" }, "alwaysShowSpoilers": { "type": "boolean" }, "alwaysShowNsfw": { "type": "boolean" }, "contentRatings": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] } }, "preferredLanguages": { "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PreferencesNotFound", "type": "string", "enum": ["PreferencesNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUsersMePreferences", "x-rezics-quota-route-operation-id": "putApiUsersMePreferences", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/privacy": { "patch": { "operationId": "updateCurrentUserPrivacy", "summary": "Update current user's Score and Progress privacy", "tags": ["Users", "First-party Preview"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "minProperties": 1, "type": "object", "properties": { "scoreVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "progressVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["scoreVisibility", "progressVisibility"], "properties": { "scoreVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "progressVisibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InteractiveSessionRequired", "type": "string", "enum": ["InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PreferencesNotFound", "type": "string", "enum": ["PreferencesNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "patchApiUsersMePrivacy", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/following": { "get": { "summary": "List Units followed by the current user", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "kind", "language", "title", "avatar", "cover", "position", "favorite", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "favorite": { "type": "boolean" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMeFollowing", "x-rezics-quota-route-operation-id": "getApiUsersMeFollowing", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/following/{unitId}": { "get": { "summary": "Get current user's follow state for a Unit", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": true, "type": "boolean" }, "kind": { "const": "realm", "type": "string" }, "favorite": { "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "boolean" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": true, "type": "boolean" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm_rule" ] }, "favorite": { "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "null" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": false, "type": "boolean" }, "kind": { "const": "realm", "type": "string" }, "favorite": { "type": "null" }, "position": { "type": "null" }, "inAppNotificationsEnabled": { "type": "null" }, "realmTagSourceSubscribed": { "type": "boolean" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": false, "type": "boolean" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm_rule" ] }, "favorite": { "type": "null" }, "position": { "type": "null" }, "inAppNotificationsEnabled": { "type": "null" }, "realmTagSourceSubscribed": { "type": "null" } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMeFollowingByUnitId", "x-rezics-quota-route-operation-id": "getApiUsersMeFollowingByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Follow a Unit", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["following"], "properties": { "following": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserSelfFollowForbidden", "type": "string", "enum": ["UserSelfFollowForbidden", "UserFollowBlocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUsersMeFollowingByUnitId", "x-rezics-quota-route-operation-id": "putApiUsersMeFollowingByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Unfollow a Unit", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["following"], "properties": { "following": { "type": "boolean" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUsersMeFollowingByUnitId", "x-rezics-quota-route-operation-id": "deleteApiUsersMeFollowingByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update followed Unit presentation", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "favorite": { "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["unitId", "position", "favorite", "updatedAt"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "favorite": { "type": "boolean" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUsersMeFollowingByUnitId", "x-rezics-quota-route-operation-id": "patchApiUsersMeFollowingByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/following/{unitId}/settings": { "put": { "summary": "Replace notification and personalization settings for a followed Unit", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "inAppNotificationsEnabled", "realmTagSourceSubscribed"], "properties": { "kind": { "const": "realm", "type": "string" }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "inAppNotificationsEnabled", "realmTagSourceSubscribed"], "properties": { "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm_rule" ] }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "null" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": true, "type": "boolean" }, "kind": { "const": "realm", "type": "string" }, "favorite": { "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "boolean" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": true, "type": "boolean" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm_rule" ] }, "favorite": { "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "inAppNotificationsEnabled": { "type": "boolean" }, "realmTagSourceSubscribed": { "type": "null" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": false, "type": "boolean" }, "kind": { "const": "realm", "type": "string" }, "favorite": { "type": "null" }, "position": { "type": "null" }, "inAppNotificationsEnabled": { "type": "null" }, "realmTagSourceSubscribed": { "type": "boolean" } } }, { "type": "object", "required": [ "following", "kind", "favorite", "position", "inAppNotificationsEnabled", "realmTagSourceSubscribed" ], "properties": { "following": { "const": false, "type": "boolean" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm_rule" ] }, "favorite": { "type": "null" }, "position": { "type": "null" }, "inAppNotificationsEnabled": { "type": "null" }, "realmTagSourceSubscribed": { "type": "null" } } } ] } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FollowingTargetKindMismatch", "type": "string", "enum": ["FollowingTargetKindMismatch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUsersMeFollowingByUnitIdSettings", "x-rezics-quota-route-operation-id": "putApiUsersMeFollowingByUnitIdSettings", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/{id}/activity": { "get": { "operationId": "getUserProfileActivity", "summary": "Get visible Score and Progress activity for a public Profile", "tags": ["Users"], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["scores", "progress"], "properties": { "scores": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "unitId", "unitKind", "unitLanguage", "unitTitle", "realmId", "realmTitle", "value", "visibility", "updatedAt" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "unitLanguage": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "unitTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progress": { "type": "array", "items": { "type": "object", "required": [ "unitId", "unitKind", "unitLanguage", "unitTitle", "status", "progress", "completedCount", "visibility", "lastSeenAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "unitLanguage": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "unitTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completedCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "lastSeenAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiUsersByIdActivity", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/{id}": { "get": { "summary": "Public user profile", "tags": ["Users"], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "slugAddress", "status", "visibility", "language", "name", "avatar", "banner", "summary", "description", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "viewerFollowing": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersById", "x-rezics-quota-route-operation-id": "getApiUsersById", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/blocks": { "get": { "summary": "List blocked users", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["userId", "name", "createdAt"], "properties": { "userId": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMeBlocks", "x-rezics-quota-route-operation-id": "getApiUsersMeBlocks", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/{id}/block": { "put": { "summary": "Block user", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["blocked"], "properties": { "blocked": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserSelfBlockForbidden", "type": "string", "enum": ["UserSelfBlockForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUsersByIdBlock", "x-rezics-quota-route-operation-id": "putApiUsersByIdBlock", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Unblock user", "tags": ["Users"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["blocked"], "properties": { "blocked": { "type": "boolean" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUsersByIdBlock", "x-rezics-quota-route-operation-id": "deleteApiUsersByIdBlock", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/": { "post": { "summary": "Create a custom Zone theme Unit", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["localization"], "properties": { "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "language", "title", "createdAt", "updatedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string" }, "title": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themes", "x-rezics-quota-route-operation-id": "postApiZone-themes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/{themeUnitId}/localizations/{language}": { "put": { "summary": "Create or replace a Zone theme localization", "tags": ["Zone Themes"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeNotFound", "type": "string", "enum": ["ZoneThemeNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["title"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "putApiZone-themesByThemeUnitIdLocalizationsByLanguage", "x-rezics-quota-route-operation-id": "putApiZone-themesByThemeUnitIdLocalizationsByLanguage", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/review-queue": { "get": { "summary": "List the bounded Zone theme review queue", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 25, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 25, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "allOf": [ { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "object", "required": ["sourceCss", "transformedCss", "assetIds"], "properties": { "sourceCss": { "maxLength": 65536, "type": "string" }, "transformedCss": { "maxLength": 65536, "type": "string" }, "assetIds": { "maxItems": 16, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } } } } ] } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZone-themesReview-queue", "x-rezics-quota-route-operation-id": "getApiZone-themesReview-queue", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/revalidation": { "post": { "summary": "Schedule a keyset batch for Zone theme contract revalidation", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["sourceContractVersion"], "properties": { "sourceContractVersion": { "minLength": 1, "maxLength": 32, "type": "string" }, "cursor": { "format": "uuid", "type": "string" }, "limit": { "minimum": 1, "maximum": 1000, "default": 250, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 1000, "default": 250, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "rejected", "contractVersion", "nextCursor"], "properties": { "updated": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rejected": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "contractVersion": { "type": "string" }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themesRevalidation", "x-rezics-quota-route-operation-id": "postApiZone-themesRevalidation", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/{themeUnitId}/revisions": { "get": { "summary": "List immutable Zone theme revisions", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 25, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 25, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeNotFound", "type": "string", "enum": ["ZoneThemeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiZone-themesByThemeUnitIdRevisions", "x-rezics-quota-route-operation-id": "getApiZone-themesByThemeUnitIdRevisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Submit an immutable Zone theme revision", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["css", "assetIds"], "properties": { "css": { "maxLength": 65536, "type": "string" }, "assetIds": { "maxItems": 16, "uniqueItems": true, "default": [], "type": "array", "items": { "format": "uuid", "type": "string" } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeNotFound", "type": "string", "enum": ["ZoneThemeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeStylesheetInvalid", "type": "string", "enum": ["ZoneThemeStylesheetInvalid", "ZoneThemeAssetsInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themesByThemeUnitIdRevisions", "x-rezics-quota-route-operation-id": "postApiZone-themesByThemeUnitIdRevisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/{themeUnitId}/revisions/{revisionId}/automated-review": { "post": { "summary": "Record Zone theme render-farm and AI review", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["renderReview", "aiReview"], "properties": { "renderReview": { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "type": "string", "enum": [375, 768, 1280] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "aiReview": { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionNotFound", "type": "string", "enum": ["ZoneThemeRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionStateConflict", "type": "string", "enum": ["ZoneThemeRevisionStateConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeAutomatedReviewInvalid", "type": "string", "enum": ["ZoneThemeAutomatedReviewInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdAutomated-review", "x-rezics-quota-route-operation-id": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdAutomated-review", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/{themeUnitId}/revisions/{revisionId}/decision": { "post": { "summary": "Approve or reject a Zone theme revision", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["decision"], "properties": { "decision": { "const": "approve", "type": "string" }, "reason": { "maxLength": 2000, "type": "string" } } }, { "type": "object", "required": ["decision", "reason"], "properties": { "decision": { "const": "reject", "type": "string" }, "reason": { "minLength": 1, "maxLength": 2000, "type": "string" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionNotFound", "type": "string", "enum": ["ZoneThemeRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionStateConflict", "type": "string", "enum": ["ZoneThemeRevisionStateConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeAssetsInvalid", "type": "string", "enum": ["ZoneThemeAssetsInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdDecision", "x-rezics-quota-route-operation-id": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdDecision", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/zone-themes/{themeUnitId}/revisions/{revisionId}/kill": { "post": { "summary": "Kill an approved Zone theme revision globally", "tags": ["Zone Themes"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "themeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["reason"], "properties": { "reason": { "minLength": 1, "maxLength": 2000, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "themeUnitId", "contractVersion", "sha256", "state", "automatedReview", "renderReview", "aiReview", "decisionReason", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "themeUnitId": { "format": "uuid", "type": "string" }, "contractVersion": { "type": "string" }, "sha256": { "pattern": "^[0-9a-f]{64}$", "type": "string" }, "state": { "default": "pending_automated", "type": "string", "enum": [ "pending_automated", "pending_human", "approved", "rejected", "killed", "revalidation_required" ] }, "automatedReview": { "additionalProperties": false, "type": "object", "required": [ "contractVersion", "declarationCount", "minifiedBytes", "ruleCount", "selectorCount" ], "properties": { "contractVersion": { "type": "string" }, "declarationCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minifiedBytes": { "minimum": 0, "maximum": 65536, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 65536, "type": "integer" } ] }, "ruleCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "selectorCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "renderReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["captures"], "properties": { "captures": { "minItems": 6, "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "breakpoint", "colorScheme", "screenshotAssetId", "layoutShift", "contrastViolations" ], "properties": { "breakpoint": { "anyOf": [ { "const": 375, "type": "number" }, { "const": 768, "type": "number" }, { "const": 1280, "type": "number" } ] }, "colorScheme": { "default": "light", "type": "string", "enum": ["light", "dark"] }, "screenshotAssetId": { "format": "uuid", "type": "string" }, "layoutShift": { "minimum": 0, "type": "number" }, "contrastViolations": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "type": "null" } ] }, "aiReview": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["model", "passed", "findings"], "properties": { "model": { "minLength": 1, "maxLength": 200, "type": "string" }, "passed": { "type": "boolean" }, "findings": { "maxItems": 64, "type": "array", "items": { "minLength": 1, "maxLength": 1000, "type": "string" } } } }, { "type": "null" } ] }, "decisionReason": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionNotFound", "type": "string", "enum": ["ZoneThemeRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ZoneThemeRevisionStateConflict", "type": "string", "enum": ["ZoneThemeRevisionStateConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdKill", "x-rezics-quota-route-operation-id": "postApiZone-themesByThemeUnitIdRevisionsByRevisionIdKill", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-access/policy": { "get": { "summary": "Get the platform access policy", "tags": ["Platform access"], "security": [{ "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["capabilities"], "properties": { "capabilities": { "uniqueItems": true, "type": "array", "items": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-accessPolicy", "x-rezics-quota-route-operation-id": "getApiPlatform-accessPolicy", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-access/profiles": { "get": { "summary": "List or search Profiles and their platform access", "tags": ["Platform access"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "query", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 200, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["profileId", "name", "email", "grants", "revision"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "email": { "format": "email", "type": "string" }, "grants": { "type": "array", "items": { "type": "object", "required": [ "id", "capability", "grantedByProfileId", "expiresAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "capability": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] }, "grantedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "revision": { "minLength": 1, "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-accessProfiles", "x-rezics-quota-route-operation-id": "getApiPlatform-accessProfiles", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-access/profiles/{profileId}": { "get": { "summary": "Get one Profile's platform access", "tags": ["Platform access"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "profileId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["profileId", "name", "email", "grants", "revision"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "email": { "format": "email", "type": "string" }, "grants": { "type": "array", "items": { "type": "object", "required": [ "id", "capability", "grantedByProfileId", "expiresAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "capability": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] }, "grantedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "revision": { "minLength": 1, "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileNotFound", "type": "string", "enum": ["ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-accessProfilesByProfileId", "x-rezics-quota-route-operation-id": "getApiPlatform-accessProfilesByProfileId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace one Profile's platform access", "tags": ["Platform access"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "profileId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "grants"], "properties": { "expectedRevision": { "minLength": 1, "type": "string" }, "grants": { "maxItems": 43, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["capability", "expiresAt"], "properties": { "capability": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["profileId", "name", "email", "grants", "revision"], "properties": { "profileId": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "email": { "format": "email", "type": "string" }, "grants": { "type": "array", "items": { "type": "object", "required": [ "id", "capability", "grantedByProfileId", "expiresAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "capability": { "default": "platform.access.read", "type": "string", "enum": [ "platform.access.read", "platform.access.manage", "platform.audit.read", "platform.user.read", "platform.user.status.update", "platform.session.read", "platform.session.revoke", "entity.associations.override", "unit.edit", "platform.development_preview.access", "platform.zone_theme.review", "platform.zone_theme.kill", "unit.governance.read", "unit.merge.propose", "unit.merge.review", "unit.merge", "unit.ownership.override", "unit.license.manage", "unit.delete", "unit.restore", "unit.slug.manage", "unit.slug.namespace.manage", "unit.slug.redirect.release", "platform.api_quota_policy.read", "platform.api_quota_policy.update", "platform.user.api_quota.read", "platform.user.api_quota.update", "platform.user.api_token.api_quota.read", "platform.user.api_token.api_quota.update", "platform.moderate", "platform.suppress", "realm.contribute", "realm.units.create", "realm.post.replies.create", "realm.settings.update", "realm.members.read", "realm.members.manage", "realm.rules.update", "realm.pins.manage", "realm.tags.manage", "realm.tag-voting.update", "realm.tag-contexts.manage", "realm.units.moderate" ] }, "grantedByProfileId": { "format": "uuid", "type": "string" }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "revision": { "minLength": 1, "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CapabilityGrantExpiryInvalid", "type": "string", "enum": [ "CapabilityGrantExpiryInvalid", "PlatformAccessConfigurationInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "FreshSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ProfileNotFound", "type": "string", "enum": ["ProfileNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformAccessManagerRequired", "type": "string", "enum": [ "PlatformAccessManagerRequired", "PlatformAccessRevisionConflict" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiPlatform-accessProfilesByProfileId", "x-rezics-quota-route-operation-id": "putApiPlatform-accessProfilesByProfileId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-users": { "get": { "summary": "List platform users", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 500, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } }, { "name": "search", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 200, "type": "string" } }, { "name": "state", "in": "query", "required": false, "schema": { "default": "active", "type": "string", "enum": ["active", "suspended", "closed"] } }, { "name": "emailVerified", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "userId", "profileId", "name", "email", "emailVerified", "accountState", "activeSessionCount", "createdAt", "updatedAt" ], "properties": { "userId": { "format": "uuid", "type": "string" }, "profileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "name": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "accountState": { "type": "object", "required": [ "state", "governanceDecisionId", "note", "expiresAt", "revision", "updatedAt", "updatedByProfileId" ], "properties": { "state": { "default": "active", "type": "string", "enum": ["active", "suspended", "closed"] }, "governanceDecisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "expiresAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "revision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "updatedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "updatedByProfileId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, "activeSessionCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-users", "x-rezics-quota-route-operation-id": "getApiPlatform-users", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-users/{userId}": { "get": { "summary": "Get one platform user", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "userId", "profileId", "name", "email", "emailVerified", "accountState", "activeSessionCount", "createdAt", "updatedAt" ], "properties": { "userId": { "format": "uuid", "type": "string" }, "profileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "name": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "accountState": { "type": "object", "required": [ "state", "governanceDecisionId", "note", "expiresAt", "revision", "updatedAt", "updatedByProfileId" ], "properties": { "state": { "default": "active", "type": "string", "enum": ["active", "suspended", "closed"] }, "governanceDecisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "revision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "updatedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "activeSessionCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-usersByUserId", "x-rezics-quota-route-operation-id": "getApiPlatform-usersByUserId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-users/{userId}/account-state": { "put": { "summary": "Replace a platform user account state", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "rules", "state"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "state": { "const": "active", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "rules", "state"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "state": { "const": "suspended", "type": "string" }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["expectedRevision", "rules", "state"], "properties": { "expectedRevision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "state": { "const": "closed", "type": "string" }, "note": { "minLength": 1, "maxLength": 2000, "type": "string" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "state", "governanceDecisionId", "note", "expiresAt", "revision", "updatedAt", "updatedByProfileId" ], "properties": { "state": { "default": "active", "type": "string", "enum": ["active", "suspended", "closed"] }, "governanceDecisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "note": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "expiresAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "revision": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "updatedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleSourceForbidden", "type": "string", "enum": ["GovernanceRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "FreshSessionRequired", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserAccountStateRevisionConflict", "type": "string", "enum": [ "UserAccountStateRevisionConflict", "UserSelfStatusChangeForbidden", "PlatformUserManagerRequired", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserAccountStateExpiryInvalid", "type": "string", "enum": ["UserAccountStateExpiryInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiPlatform-usersByUserIdAccount-state", "x-rezics-quota-route-operation-id": "putApiPlatform-usersByUserIdAccount-state", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-users/{userId}/sessions": { "get": { "summary": "List a platform user's sessions", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "expiresAt", "createdAt", "updatedAt", "ipAddress", "userAgent", "current" ], "properties": { "id": { "format": "uuid", "type": "string" }, "expiresAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "ipAddress": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "userAgent": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "current": { "type": "boolean" } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPlatform-usersByUserIdSessions", "x-rezics-quota-route-operation-id": "getApiPlatform-usersByUserIdSessions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Revoke all platform user sessions", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["revokedCount"], "properties": { "revokedCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "FreshSessionRequired", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UserNotFound", "type": "string", "enum": ["UserNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiPlatform-usersByUserIdSessions", "x-rezics-quota-route-operation-id": "deleteApiPlatform-usersByUserIdSessions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/platform-users/{userId}/sessions/{sessionId}": { "delete": { "summary": "Revoke a platform user session", "tags": ["Platform Users"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "userId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "sessionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["revokedCount"], "properties": { "revokedCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired", "InteractiveSessionRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AccountSuspended", "type": "string", "enum": [ "AccountSuspended", "AccountClosed", "FreshSessionRequired", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SessionNotFound", "type": "string", "enum": ["SessionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiPlatform-usersByUserIdSessionsBySessionId", "x-rezics-quota-route-operation-id": "deleteApiPlatform-usersByUserIdSessionsBySessionId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags/suggestions": { "get": { "summary": "Suggest terminal Tags from a compound Tag query", "tags": ["Tags"], "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "minLength": 1, "maxLength": 16, "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 20, "default": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 20, "default": 10, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "selection", "tagId", "language", "title", "summary", "avatar", "pathId", "members", "matchDirection", "usageCount", "score", "voteCount" ], "properties": { "selection": { "const": "path", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "pathId": { "format": "uuid", "type": "string" }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "matchDirection": { "anyOf": [ { "const": "forward", "type": "string" }, { "const": "reverse", "type": "string" } ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "object", "required": [ "selection", "tagId", "language", "title", "summary", "avatar", "pathId", "members", "matchDirection", "usageCount", "score", "voteCount" ], "properties": { "selection": { "const": "direct", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "pathId": { "type": "null" }, "members": { "type": "array", "minItems": 0, "maxItems": 0 }, "matchDirection": { "type": "null" }, "usageCount": { "const": 0, "type": "number" }, "score": { "const": 0, "type": "number" }, "voteCount": { "const": 0, "type": "number" } } } ] } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTagsSuggestions", "x-rezics-quota-route-operation-id": "getApiTagsSuggestions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags/{tagId}/hierarchy": { "get": { "summary": "Get a Tag with direct children and grandchildren", "tags": ["Tags"], "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "childLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } }, { "name": "grandchildLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 12, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 12, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["tagId", "language", "title", "summary", "children"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "children": { "type": "array", "items": { "type": "object", "required": [ "tagId", "language", "title", "summary", "score", "voteCount", "children" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "children": { "type": "array", "items": { "type": "object", "required": [ "tagId", "language", "title", "summary", "score", "voteCount" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagNotFound", "type": "string", "enum": ["TagNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTagsByTagIdHierarchy", "x-rezics-quota-route-operation-id": "getApiTagsByTagIdHierarchy", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags/{tagId}/paths": { "get": { "summary": "List accepted Tag Paths ending at a Tag", "tags": ["Tags"], "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 20, "default": 5, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 20, "default": 5, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["pathId", "usageCount", "score", "voteCount", "members"], "properties": { "pathId": { "format": "uuid", "type": "string" }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTagsByTagIdPaths", "x-rezics-quota-route-operation-id": "getApiTagsByTagIdPaths", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/definition-warnings": { "post": { "summary": "List related accepted definitions before creating a Tag Path", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["memberTagIds"], "properties": { "memberTagIds": { "minItems": 2, "maxItems": 16, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "limit": { "minimum": 1, "maximum": 20, "default": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 20, "default": 10, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["pathId", "relation", "usageCount", "members"], "properties": { "pathId": { "format": "uuid", "type": "string" }, "relation": { "type": "string", "enum": [ "existing_shorter_suffix", "existing_longer_extension", "same_terminal" ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiTag-pathsDefinition-warnings", "x-rezics-quota-route-operation-id": "postApiTag-pathsDefinition-warnings", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/search": { "get": { "summary": "Search accepted Tag Paths for curation", "tags": ["Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "q", "in": "query", "required": true, "schema": { "minLength": 1, "maxLength": 16, "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 20, "default": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 20, "default": 10, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "selection", "tagId", "language", "title", "summary", "avatar", "pathId", "members", "matchDirection", "usageCount", "score", "voteCount" ], "properties": { "selection": { "const": "path", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "pathId": { "format": "uuid", "type": "string" }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "matchDirection": { "anyOf": [ { "const": "forward", "type": "string" }, { "const": "reverse", "type": "string" } ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "object", "required": [ "selection", "tagId", "language", "title", "summary", "avatar", "pathId", "members", "matchDirection", "usageCount", "score", "voteCount" ], "properties": { "selection": { "const": "direct", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "pathId": { "type": "null" }, "members": { "type": "array", "minItems": 0, "maxItems": 0 }, "matchDirection": { "type": "null" }, "usageCount": { "const": 0, "type": "number" }, "score": { "const": 0, "type": "number" }, "voteCount": { "const": 0, "type": "number" } } } ] } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTag-pathsSearch", "x-rezics-quota-route-operation-id": "getApiTag-pathsSearch", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths": { "post": { "summary": "Create or find and upvote an immutable Tag Path", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["memberTagIds"], "properties": { "memberTagIds": { "minItems": 2, "maxItems": 16, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["pathId", "created"], "properties": { "pathId": { "format": "uuid", "type": "string" }, "created": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagNotFound", "type": "string", "enum": ["TagNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiTag-paths", "x-rezics-quota-route-operation-id": "postApiTag-paths", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/{pathId}": { "get": { "summary": "Get a Tag Path", "tags": ["Tags"], "parameters": [ { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "terminalTagId", "createdByProfileId", "score", "voteCount", "usageCount", "viewerVote", "mergedIntoPathId", "members", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "terminalTagId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "mergedIntoPathId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": ["ordinal", "tagId", "language", "title", "summary", "avatar"], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTag-pathsByPathId", "x-rezics-quota-route-operation-id": "getApiTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/{pathId}/vote": { "put": { "summary": "Vote on a Tag Path definition", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["score", "voteCount", "viewerVote"], "properties": { "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiTag-pathsByPathIdVote", "x-rezics-quota-route-operation-id": "putApiTag-pathsByPathIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Tag Path definition vote", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["score", "voteCount", "viewerVote"], "properties": { "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiTag-pathsByPathIdVote", "x-rezics-quota-route-operation-id": "deleteApiTag-pathsByPathIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/merges": { "post": { "summary": "Propose a manually governed Tag Path merge", "tags": ["Tags"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["sourcePathId", "targetPathId", "reason", "proposalSource"], "properties": { "sourcePathId": { "format": "uuid", "type": "string" }, "targetPathId": { "format": "uuid", "type": "string" }, "reason": { "minLength": 1, "maxLength": 2000, "type": "string" }, "proposalSource": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "system", "runId"], "properties": { "kind": { "const": "assisted", "type": "string" }, "system": { "minLength": 1, "maxLength": 128, "type": "string" }, "runId": { "minLength": 1, "maxLength": 256, "type": "string" }, "model": { "minLength": 1, "maxLength": 128, "type": "string" }, "confidence": { "minimum": 0, "maximum": 1, "type": "number" } } } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "sourcePathId", "targetPathId", "status", "proposalSource"], "properties": { "id": { "format": "uuid", "type": "string" }, "sourcePathId": { "format": "uuid", "type": "string" }, "targetPathId": { "format": "uuid", "type": "string" }, "status": { "type": "string", "enum": ["proposed", "accepted", "rejected", "reversed"] }, "proposalSource": { "anyOf": [ { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "type": "object", "required": ["kind", "system", "runId"], "properties": { "kind": { "const": "assisted", "type": "string" }, "system": { "type": "string" }, "runId": { "type": "string" }, "model": { "type": "string" }, "confidence": { "minimum": 0, "maximum": 1, "type": "number" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPathMerge", "type": "string", "enum": ["InvalidTagPathMerge"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiTag-pathsMerges", "x-rezics-quota-route-operation-id": "postApiTag-pathsMerges", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/merges/pending": { "get": { "summary": "List pending manual Tag Path merge proposals", "tags": ["Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "sourcePathId", "targetPathId", "sourceMembers", "targetMembers", "reason", "proposalSource", "proposedByProfileId", "status", "ageSeconds", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourcePathId": { "format": "uuid", "type": "string" }, "targetPathId": { "format": "uuid", "type": "string" }, "sourceMembers": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "targetMembers": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "reason": { "type": "string" }, "proposalSource": { "anyOf": [ { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "type": "object", "required": ["kind", "system", "runId"], "properties": { "kind": { "const": "assisted", "type": "string" }, "system": { "type": "string" }, "runId": { "type": "string" }, "model": { "type": "string" }, "confidence": { "minimum": 0, "maximum": 1, "type": "number" } } } ] }, "proposedByProfileId": { "format": "uuid", "type": "string" }, "status": { "const": "proposed", "type": "string" }, "ageSeconds": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTag-pathsMergesPending", "x-rezics-quota-route-operation-id": "getApiTag-pathsMergesPending", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tag-paths/merges/{mergeId}/resolution": { "put": { "summary": "Resolve a Tag Path merge proposal", "tags": ["Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "mergeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["resolution"], "properties": { "resolution": { "type": "string", "enum": ["accepted", "rejected", "reversed"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "sourcePathId", "targetPathId", "status", "proposalSource"], "properties": { "id": { "format": "uuid", "type": "string" }, "sourcePathId": { "format": "uuid", "type": "string" }, "targetPathId": { "format": "uuid", "type": "string" }, "status": { "type": "string", "enum": ["proposed", "accepted", "rejected", "reversed"] }, "proposalSource": { "anyOf": [ { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "type": "object", "required": ["kind", "system", "runId"], "properties": { "kind": { "const": "assisted", "type": "string" }, "system": { "type": "string" }, "runId": { "type": "string" }, "model": { "type": "string" }, "confidence": { "minimum": 0, "maximum": 1, "type": "number" } } } ] }, "createdAt": { "format": "date-time", "type": "string" }, "resolvedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathMergeNotFound", "type": "string", "enum": ["TagPathMergeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPathMerge", "type": "string", "enum": ["InvalidTagPathMerge"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiTag-pathsMergesByMergeIdResolution", "x-rezics-quota-route-operation-id": "putApiTag-pathsMergesByMergeIdResolution", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/tags": { "get": { "summary": "Get global and subscribed Realm Tag assertions for a Unit", "tags": ["Tags"], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "globalLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } }, { "name": "pathLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } }, { "name": "sourceLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 30, "default": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 30, "default": 10, "type": "integer" } ] } }, { "name": "perRealmLimit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 12, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 12, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["paths", "global", "totals", "realms", "voteRealms"], "properties": { "paths": { "type": "array", "items": { "type": "object", "required": [ "pathId", "pinned", "position", "score", "voteCount", "viewerVote", "spoilerVoteCount", "spoilerDistribution", "viewerSpoilerLevel", "definitionScore", "definitionVoteCount", "usageCount", "members", "createdAt", "updatedAt" ], "properties": { "pathId": { "format": "uuid", "type": "string" }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "spoilerVoteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "spoilerDistribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] }, "definitionScore": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "definitionVoteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "global": { "type": "array", "items": { "type": "object", "required": [ "tagId", "language", "title", "summary", "avatar", "createdAt", "updatedAt", "pinned", "position", "score", "voteCount", "viewerVote" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } } }, "totals": { "type": "object", "required": ["paths", "global"], "properties": { "paths": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "global": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "realms": { "type": "array", "items": { "type": "object", "required": [ "realmId", "language", "title", "summary", "avatar", "position", "createdAt", "updatedAt", "canVote", "votedTags" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "canVote": { "type": "boolean" }, "votedTags": { "minItems": 1, "type": "array", "items": { "type": "object", "required": [ "tagId", "language", "title", "summary", "avatar", "createdAt", "updatedAt", "realmId", "contextPostId", "score", "voteCount", "viewerVote" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } } } } } }, "voteRealms": { "type": "array", "items": { "type": "object", "required": ["realmId", "language", "title", "summary", "avatar"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByTypeByUnitIdTags", "x-rezics-quota-route-operation-id": "getApiUnitsByTypeByUnitIdTags", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/tag-paths/{pathId}": { "put": { "summary": "Apply a Tag Path to a Unit", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "pathId", "score", "voteCount", "viewerVote", "spoilerVoteCount", "spoilerDistribution", "viewerSpoilerLevel" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "spoilerVoteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "spoilerDistribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdTag-pathsByPathId", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Tag Path from a Unit", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagPathApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdTag-pathsByPathId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/tag-paths/{pathId}/judgment": { "put": { "summary": "Judge Tag Path fit or spoiler for a Unit", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "minProperties": 1, "type": "object", "properties": { "fitVote": { "type": "string", "enum": [-1, 1] }, "spoilerLevel": { "type": "string", "enum": [0, 1, 2] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "pathId", "score", "voteCount", "viewerVote", "spoilerVoteCount", "spoilerDistribution", "viewerSpoilerLevel" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "spoilerVoteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "spoilerDistribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagPathApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Unit Tag Path judgment", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "pathId", "score", "voteCount", "viewerVote", "spoilerVoteCount", "spoilerDistribution", "viewerSpoilerLevel" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "spoilerVoteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "spoilerDistribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagPathApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-paths": { "get": { "summary": "List Realm Tag Paths with independent authority resolution", "tags": ["Realms", "Tags"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "policy", "items"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "policy": { "type": "object", "required": ["fitFallback", "spoilerFallback"], "properties": { "fitFallback": { "type": "string", "enum": ["inherit", "isolate"] }, "spoilerFallback": { "type": "string", "enum": ["inherit", "isolate"] } } }, "items": { "type": "array", "items": { "type": "object", "required": ["pathId", "members", "definition", "application", "createdAt"], "properties": { "pathId": { "format": "uuid", "type": "string" }, "members": { "minItems": 2, "maxItems": 16, "type": "array", "items": { "type": "object", "required": [ "ordinal", "tagId", "language", "title", "summary", "avatar" ], "properties": { "ordinal": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "definition": { "type": "object", "required": [ "authority", "score", "voteCount", "usageCount", "viewerVote", "provenance" ], "properties": { "authority": { "const": "realm", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "usageCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "provenance": { "type": "object", "required": ["authority", "relation"], "properties": { "authority": { "const": "realm", "type": "string" }, "relation": { "const": "realm_tag_path_vote_stat", "type": "string" } } } } }, "application": { "nullable": true, "anyOf": [ { "type": "object", "required": ["fit", "spoiler"], "properties": { "fit": { "type": "object", "required": [ "authority", "resolutionState", "provenance", "score", "voteCount", "viewerVote" ], "properties": { "authority": { "anyOf": [ { "const": "realm", "type": "string" }, { "const": "global", "type": "string" } ] }, "resolutionState": { "anyOf": [ { "const": "decided", "type": "string" }, { "const": "inherited", "type": "string" }, { "const": "unresolved", "type": "string" } ] }, "provenance": { "type": "object", "required": ["authority", "relation", "dimension"], "properties": { "authority": { "anyOf": [ { "const": "realm", "type": "string" }, { "const": "global", "type": "string" } ] }, "relation": { "anyOf": [ { "const": "realm_unit_tag_path_judgment_stat", "type": "string" }, { "const": "unit_tag_path_judgment_stat", "type": "string" } ] }, "dimension": { "anyOf": [ { "const": "fit", "type": "string" }, { "const": "spoiler", "type": "string" } ] } } }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } }, "spoiler": { "type": "object", "required": [ "authority", "resolutionState", "provenance", "voteCount", "distribution", "viewerLevel" ], "properties": { "authority": { "anyOf": [ { "const": "realm", "type": "string" }, { "const": "global", "type": "string" } ] }, "resolutionState": { "anyOf": [ { "const": "decided", "type": "string" }, { "const": "inherited", "type": "string" }, { "const": "unresolved", "type": "string" } ] }, "provenance": { "type": "object", "required": ["authority", "relation", "dimension"], "properties": { "authority": { "anyOf": [ { "const": "realm", "type": "string" }, { "const": "global", "type": "string" } ] }, "relation": { "anyOf": [ { "const": "realm_unit_tag_path_judgment_stat", "type": "string" }, { "const": "unit_tag_path_judgment_stat", "type": "string" } ] }, "dimension": { "anyOf": [ { "const": "fit", "type": "string" }, { "const": "spoiler", "type": "string" } ] } } }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdTag-paths", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdTag-paths", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-paths/{pathId}": { "put": { "summary": "Adopt a Tag Path in a Realm", "tags": ["Realms", "Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerVote": { "type": "string", "enum": [-1, 1] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTag-pathsByPathId", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-paths/{pathId}/vote": { "put": { "summary": "Vote on a Realm Tag Path definition", "tags": ["Realms", "Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerVote": { "type": "string", "enum": [-1, 1] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTag-pathsByPathIdVote", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTag-pathsByPathIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Realm Tag Path definition vote", "tags": ["Realms", "Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerVote": { "type": "string", "enum": [-1, 1] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathNotFound", "type": "string", "enum": ["TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiRealmsByRealmIdTag-pathsByPathIdVote", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdTag-pathsByPathIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/tag-paths/{pathId}": { "put": { "summary": "Apply an adopted Tag Path to a Realm Unit", "tags": ["Realms", "Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerFitVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathApplicationNotFound", "type": "string", "enum": ["TagPathApplicationNotFound", "TagPathNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathId", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Tag Path application from a Realm Unit", "tags": ["Realms", "Tags"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathApplicationNotFound", "type": "string", "enum": ["TagPathApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathId", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/tag-paths/{pathId}/judgment": { "put": { "summary": "Judge Realm-local Tag Path fit or spoiler", "tags": ["Realms", "Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "minProperties": 1, "type": "object", "properties": { "fitVote": { "type": "string", "enum": [-1, 1] }, "spoilerLevel": { "type": "string", "enum": [0, 1, 2] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerFitVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagPathApplicationNotFound", "type": "string", "enum": ["TagPathApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Clear a Realm-local Tag Path judgment", "tags": ["Realms", "Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pathId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "pathId"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "pathId": { "format": "uuid", "type": "string" }, "viewerFitVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "viewerSpoilerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdUnitsByUnitIdTag-pathsByPathIdJudgment", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-path-policy": { "put": { "summary": "Update independent Realm Tag Path fallback policies", "tags": ["Realms", "Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["fitFallback", "spoilerFallback"], "properties": { "fitFallback": { "type": "string", "enum": ["inherit", "isolate"] }, "spoilerFallback": { "type": "string", "enum": ["inherit", "isolate"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "fitFallback", "spoilerFallback"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "fitFallback": { "type": "string", "enum": ["inherit", "isolate"] }, "spoilerFallback": { "type": "string", "enum": ["inherit", "isolate"] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTag-path-policy", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTag-path-policy", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/tag-realm-subscriptions": { "get": { "summary": "List the current user's ordered Realm Tag sources", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "realmId", "language", "title", "summary", "avatar", "position", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUsersMeTag-realm-subscriptions", "x-rezics-quota-route-operation-id": "getApiUsersMeTag-realm-subscriptions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/users/me/tag-realm-subscriptions/{realmId}": { "put": { "summary": "Subscribe to or reorder a Realm Tag source", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "language", "title", "summary", "avatar", "position", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUsersMeTag-realm-subscriptionsByRealmId", "x-rezics-quota-route-operation-id": "putApiUsersMeTag-realm-subscriptionsByRealmId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Unsubscribe from a Realm Tag source", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "subscribed"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "subscribed": { "type": "boolean" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUsersMeTag-realm-subscriptionsByRealmId", "x-rezics-quota-route-operation-id": "deleteApiUsersMeTag-realm-subscriptionsByRealmId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/resolve": { "post": { "operationId": "resolveUnitSlugAddress", "summary": "Resolve a complete public Unit slug path", "description": "Resolves one to three slug labels to a public Unit ID and reports its canonical path. Browser routes use the resolved ID for subsequent resource reads and cache identity.", "tags": ["Slug Addresses"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["path"], "properties": { "path": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "kind", "path", "canonicalPath", "redirected"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "path": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } }, "redirected": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugScopeCycle", "type": "string", "enum": ["SlugScopeCycle"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugDepthExceeded", "type": "string", "enum": ["SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "postApiSlug-addressesResolve", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/public-units/{unitId}": { "get": { "operationId": "getPublicUnitSlugAddress", "summary": "Get a Unit public canonical slug address", "description": "Returns a public Unit's optional canonical slug address for ID-route canonicalization. Missing, private, moderated, deleted, or unaddressed Units all return not found.", "tags": ["Slug Addresses"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiSlug-addressesPublic-unitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/scopes/{scopeUnitId}/{slug}": { "get": { "operationId": "resolveScopedUnitSlugAddress", "summary": "Resolve a Unit slug in its direct scope", "description": "Resolves a direct scope Unit ID and slug label to a public Unit ID. An optional expected kind prevents cross-resource matches. The response includes the complete canonical path so callers can redirect former addresses.", "tags": ["Slug Addresses"], "parameters": [ { "name": "scopeUnitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "slug", "in": "path", "required": true, "schema": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "kind", "path", "canonicalPath", "redirected"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "path": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } }, "redirected": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiSlug-addressesScopesByScopeUnitIdBySlug", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/units/{unitId}": { "get": { "operationId": "getUnitSlugAddressWithPlatformAccess", "summary": "Get a Unit canonical slug address with platform access", "description": "Development-preview control plane. Returns canonical address registry details for authorized platform workflows, including the administrative address ID. Ordinary resource responses expose only the nullable public slugAddress projection.", "tags": ["Slug Addresses"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["addressId", "unitId", "scopeUnitId", "slug"], "properties": { "addressId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitSlugAddressNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiSlug-addressesUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "operationId": "replaceUnitSlugAddressWithPlatformAccess", "summary": "Replace any Unit slug address with platform access", "description": "Development-preview control plane. Assigns or replaces a canonical address independently of Unit creation and update. It retains the former address as a redirect and succeeds idempotently when the requested address is already canonical.", "tags": ["Slug Addresses"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["scopeUnitId", "slug", "rules"], "properties": { "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "addressId", "unitId", "scopeUnitId", "slug", "redirectAddressId", "canonicalPath" ], "properties": { "addressId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "redirectAddressId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug", "GovernanceRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitAddressMutationForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SlugScopeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": [ "SlugTaken", "SlugScopeUnavailable", "SlugScopeCycle", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugDepthExceeded", "type": "string", "enum": ["SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "putApiSlug-addressesUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/namespaces": { "post": { "operationId": "createSlugNamespaceWithPlatformAccess", "summary": "Create an explicitly addressed namespace with platform access", "description": "Development-preview control plane. Creates a namespace Unit and its canonical address atomically. A null scope creates a top-level namespace under the virtual root; a Unit ID creates a nested namespace.", "tags": ["Slug Addresses"], "security": [{ "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["scopeUnitId", "slug", "rules"], "properties": { "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "required": [ "addressId", "unitId", "scopeUnitId", "slug", "redirectAddressId", "canonicalPath" ], "properties": { "addressId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "redirectAddressId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": [ "InvalidSlug", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitAddressMutationForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SlugScopeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": [ "SlugTaken", "SlugScopeUnavailable", "SlugScopeCycle", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugDepthExceeded", "type": "string", "enum": ["SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "postApiSlug-addressesNamespaces", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/slug-addresses/redirects/{redirectAddressId}": { "delete": { "operationId": "releaseSlugRedirectWithPlatformAccess", "summary": "Release a retained slug redirect with platform access", "description": "Development-preview control plane. Deletes one temporary Redirect record so its scoped label may be reused. This is an audited platform action; retention and quarantine policy determines when a redirect is eligible for release.", "tags": ["Slug Addresses"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleSourceForbidden", "type": "string", "enum": ["GovernanceRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitAddressMutationForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugRedirectNotFound", "type": "string", "enum": ["SlugRedirectNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleChanged", "type": "string", "enum": ["GovernanceRuleChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "redirectAddressId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["rules"], "properties": { "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } } } }, "required": true }, "x-rezics-quota-route-operation-id": "deleteApiSlug-addressesRedirectsByRedirectAddressId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/seo": { "get": { "operationId": "getPublicUnitSeoProjection", "summary": "Get a sanitized public Unit SEO projection", "description": "Returns bounded metadata for one publicly visitable Unit. Adult-rated Units return only a noindex decision and never expose authored titles, summaries, descriptions, or images.", "tags": ["Units"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "id", "kind", "contentRating", "publishedAt", "updatedAt", "indexing", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "release", "media", "video", "audio", "entity", "tag", "series", "zone", "zone_page", "collection", "post", "poll", "realm" ] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "indexing": { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "index", "type": "string" } } }, "presentation": { "additionalProperties": false, "type": "object", "required": ["language", "title", "description", "image", "context"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "description": { "nullable": true, "anyOf": [{ "maxLength": 600, "type": "string" }, { "type": "null" }] }, "image": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "context": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "entityKind"], "properties": { "kind": { "const": "entity", "type": "string" }, "entityKind": { "minLength": 1, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "zoneId", "zoneTitle"], "properties": { "kind": { "const": "zone_page", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "zoneTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "attributionTitle"], "properties": { "kind": { "const": "post", "type": "string" }, "attributionTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } ] }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": [ "id", "kind", "contentRating", "publishedAt", "updatedAt", "indexing", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "release", "media", "video", "audio", "entity", "tag", "series", "zone", "zone_page", "collection", "post", "poll", "realm" ] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "indexing": { "additionalProperties": false, "type": "object", "required": ["state", "reason"], "properties": { "state": { "const": "noindex", "type": "string" }, "reason": { "const": "unlisted", "type": "string" } } }, "presentation": { "additionalProperties": false, "type": "object", "required": ["language", "title", "description", "image", "context"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "description": { "nullable": true, "anyOf": [{ "maxLength": 600, "type": "string" }, { "type": "null" }] }, "image": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "context": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "entityKind"], "properties": { "kind": { "const": "entity", "type": "string" }, "entityKind": { "minLength": 1, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "zoneId", "zoneTitle"], "properties": { "kind": { "const": "zone_page", "type": "string" }, "zoneId": { "format": "uuid", "type": "string" }, "zoneTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "attributionTitle"], "properties": { "kind": { "const": "post", "type": "string" }, "attributionTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } ] }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": [ "id", "kind", "contentRating", "publishedAt", "updatedAt", "indexing", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "release", "media", "video", "audio", "entity", "tag", "series", "zone", "zone_page", "collection", "post", "poll", "realm" ] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "indexing": { "additionalProperties": false, "type": "object", "required": ["state", "reason"], "properties": { "state": { "const": "noindex", "type": "string" }, "reason": { "anyOf": [ { "const": "adult", "type": "string" }, { "const": "incomplete", "type": "string" } ] } } }, "presentation": { "type": "null" } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdSeo", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/presentations": { "post": { "summary": "Resolve readable Unit presentations", "tags": ["Units"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["ids"], "properties": { "ids": { "minItems": 1, "maxItems": 100, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsPresentations", "x-rezics-quota-route-operation-id": "postApiUnitsPresentations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/realm-publications": { "get": { "summary": "List a Unit's Realm publications", "tags": ["Units", "Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "publicationState", "in": "query", "required": false, "schema": { "default": "active", "type": "string", "enum": ["active", "withdrawn", "all"] } }, { "name": "realmStatus", "in": "query", "required": false, "schema": { "default": "current", "type": "string", "enum": ["current", "pending", "visible", "hidden", "removed", "all"] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "realmId", "realmKind", "language", "title", "publicationState", "status", "effectivelyVisible", "latestGovernance", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmKind": { "const": "realm", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationState": { "default": "active", "type": "string", "enum": ["active", "withdrawn"] }, "status": { "default": "pending", "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, "effectivelyVisible": { "type": "boolean" }, "latestGovernance": { "nullable": true, "anyOf": [ { "type": "object", "required": ["actionId", "actionKind", "createdAt"], "properties": { "actionId": { "format": "uuid", "type": "string" }, "actionKind": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitAccessRestricted", "UnitPermissionForbidden", "RealmCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdRealm-publications", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdRealm-publications", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/realm-publications/{realmId}": { "post": { "summary": "Publish a Unit to one Realm", "tags": ["Units", "Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitAccessRestricted", "UnitPermissionForbidden", "RealmCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRealmPublicationAlreadyExists", "type": "string", "enum": [ "UnitRealmPublicationAlreadyExists", "UnitRealmPublicationTransitionInvalid", "RealmRulesAcceptanceRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmId", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/realm-publications/{realmId}/withdraw": { "post": { "summary": "Withdraw a Unit from one Realm", "tags": ["Units", "Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitAccessRestricted", "UnitPermissionForbidden", "RealmCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitRealmPublicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRealmPublicationAlreadyExists", "type": "string", "enum": [ "UnitRealmPublicationAlreadyExists", "UnitRealmPublicationTransitionInvalid", "RealmRulesAcceptanceRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmIdWithdraw", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmIdWithdraw", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/realm-publications/{realmId}/republish": { "post": { "summary": "Republish a Unit to one Realm", "tags": ["Units", "Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitAccessRestricted", "UnitPermissionForbidden", "RealmCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitRealmPublicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRealmPublicationAlreadyExists", "type": "string", "enum": [ "UnitRealmPublicationAlreadyExists", "UnitRealmPublicationTransitionInvalid", "RealmRulesAcceptanceRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmIdRepublish", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdRealm-publicationsByRealmIdRepublish", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/series-memberships": { "get": { "summary": "List Unit Series memberships", "tags": ["Units", "Series"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["series", "releaseUnitId", "position", "releasedOn", "source"], "properties": { "series": { "type": "object", "required": ["id", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, "releaseUnitId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "source": { "default": "direct", "type": "string", "enum": ["direct", "main"] } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdSeries-memberships", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdSeries-memberships", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/status-events": { "get": { "summary": "List Unit status events", "tags": ["Units"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "fromStatus", "toStatus", "actor", "revisionId", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "fromStatus": { "nullable": true, "anyOf": [ { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, { "type": "null" } ] }, "toStatus": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "actor": { "anyOf": [ { "type": "object", "required": ["kind", "profileId", "name"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "system", "type": "string" } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "import", "type": "string" } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hidden", "type": "string" } } } ] }, "revisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdStatus-events", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdStatus-events", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/localization-order": { "get": { "summary": "Get Unit content language order", "tags": ["Units"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["languages"], "properties": { "languages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdLocalization-order", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdLocalization-order", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Reorder Unit content languages", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedLanguages", "languages"], "properties": { "expectedLanguages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "languages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["languages"], "properties": { "languages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLocalizationOrderInvalid", "type": "string", "enum": [ "UnitLocalizationOrderInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLocalizationOrderChanged", "type": "string", "enum": [ "UnitLocalizationOrderChanged", "UnitLastLocalizationRemovalForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsBy-idByUnitIdLocalization-order", "x-rezics-quota-route-operation-id": "putApiUnitsBy-idByUnitIdLocalization-order", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/localizations/{language}": { "delete": { "summary": "Remove a Unit content language", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedLanguages"], "properties": { "expectedLanguages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["languages"], "properties": { "languages": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLocalizationOrderInvalid", "type": "string", "enum": [ "UnitLocalizationOrderInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitLocalizationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitLocalizationOrderChanged", "type": "string", "enum": [ "UnitLocalizationOrderChanged", "UnitLastLocalizationRemovalForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsBy-idByUnitIdLocalizationsByLanguage", "x-rezics-quota-route-operation-id": "deleteApiUnitsBy-idByUnitIdLocalizationsByLanguage", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}": { "get": { "summary": "List published units", "tags": ["Units"], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "contentRating", "publishedAt", "createdAt", "updatedAt", "title", "summary", "attributions", "avatar", "banner", "cover" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "contentRating": { "type": "string" }, "publishedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByType", "x-rezics-quota-route-operation-id": "getApiUnitsByType", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create unit", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": ["book", "software", "media"] } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "ownershipMode", "creditAttributions", "creditAttributionRequestConsent", "version", "localization", "details" ], "properties": { "ownershipMode": { "const": "profile_owned", "type": "string" }, "creditAttributions": { "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["entityId", "role"], "properties": { "entityId": { "format": "uuid", "type": "string" }, "role": { "anyOf": [ { "const": "author", "type": "string" }, { "const": "co-author", "type": "string" }, { "const": "translator", "type": "string" }, { "const": "illustrator", "type": "string" }, { "const": "editor", "type": "string" }, { "const": "publisher", "type": "string" }, { "const": "letterer", "type": "string" }, { "const": "colorist", "type": "string" }, { "const": "developer", "type": "string" }, { "const": "composer", "type": "string" }, { "const": "designer", "type": "string" }, { "const": "director", "type": "string" }, { "const": "producer", "type": "string" }, { "const": "writer", "type": "string" }, { "const": "actor", "type": "string" }, { "const": "narrator", "type": "string" }, { "const": "studio", "type": "string" }, { "const": "distributor", "type": "string" } ] } } } }, "initialTagIds": { "maxItems": 32, "uniqueItems": true, "default": [], "type": "array", "items": { "format": "uuid", "type": "string" } }, "creditAttributionRequestConsent": { "anyOf": [ { "const": "direct_only", "type": "string" }, { "const": "allow_requests", "type": "string" } ] }, "version": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "main", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "mainUnitId"], "properties": { "kind": { "const": "variant", "type": "string" }, "mainUnitId": { "format": "uuid", "type": "string" } } } ] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "aiDisclosure": { "anyOf": [ { "const": "unknown", "type": "string" }, { "const": "none", "type": "string" }, { "const": "ai_assisted", "type": "string" }, { "const": "ai_originated", "type": "string" }, { "const": "machine_generated", "type": "string" } ] }, "licenses": { "uniqueItems": true, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "releaseStatus"], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "releaseStatus"], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" } } } ] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": [ "ownershipMode", "creditAttributions", "creditAttributionRequestConsent", "version", "localization", "details" ], "properties": { "ownershipMode": { "const": "community_owned", "type": "string" }, "creditAttributions": { "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["entityId", "role"], "properties": { "entityId": { "format": "uuid", "type": "string" }, "role": { "anyOf": [ { "const": "author", "type": "string" }, { "const": "co-author", "type": "string" }, { "const": "translator", "type": "string" }, { "const": "illustrator", "type": "string" }, { "const": "editor", "type": "string" }, { "const": "publisher", "type": "string" }, { "const": "letterer", "type": "string" }, { "const": "colorist", "type": "string" }, { "const": "developer", "type": "string" }, { "const": "composer", "type": "string" }, { "const": "designer", "type": "string" }, { "const": "director", "type": "string" }, { "const": "producer", "type": "string" }, { "const": "writer", "type": "string" }, { "const": "actor", "type": "string" }, { "const": "narrator", "type": "string" }, { "const": "studio", "type": "string" }, { "const": "distributor", "type": "string" } ] } } } }, "initialTagIds": { "maxItems": 32, "uniqueItems": true, "default": [], "type": "array", "items": { "format": "uuid", "type": "string" } }, "creditAttributionRequestConsent": { "anyOf": [ { "const": "direct_only", "type": "string" }, { "const": "allow_requests", "type": "string" } ] }, "version": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "main", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "mainUnitId"], "properties": { "kind": { "const": "variant", "type": "string" }, "mainUnitId": { "format": "uuid", "type": "string" } } } ] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "aiDisclosure": { "anyOf": [ { "const": "unknown", "type": "string" }, { "const": "none", "type": "string" }, { "const": "ai_assisted", "type": "string" }, { "const": "ai_originated", "type": "string" }, { "const": "machine_generated", "type": "string" } ] }, "licenses": { "uniqueItems": true, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "releaseStatus"], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": ["type"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "releaseStatus"], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" } } } ] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CreditAttributionRoleInvalid", "type": "string", "enum": [ "CreditAttributionRoleInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired", "UnitLicenseNotApplicable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "EntityAssociationRestricted", "UnitLicenseGrantForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "ImageAssetNotFound", "EntityEntryNotFound", "TagNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CreditAttributionRequestConfirmationRequired", "type": "string", "enum": [ "CreditAttributionRequestConfirmationRequired", "UnitVariantKindMismatch", "UnitVariantTargetIsVariant", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantChanged", "UnitVariantMainUnavailable", "UnitLicenseGrantConflict", "UnitLicenseOfferingEndForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError", "UnitContentLanguageSupportInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByType", "x-rezics-quota-route-operation-id": "postApiUnitsByType", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/book/{bookId}/chapter-draft-jobs": { "post": { "summary": "Draft Chapters attached to a draft Book", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "bookId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["bookUpdatedAt"], "properties": { "bookUpdatedAt": { "format": "date-time", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["id", "state"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "type": "string", "enum": ["pending", "completed"] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitChanged", "type": "string", "enum": ["UnitChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBookByBookIdChapter-draft-jobs", "x-rezics-quota-route-operation-id": "postApiUnitsBookByBookIdChapter-draft-jobs", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/content-language-support/evidence": { "get": { "summary": "List bounded Unit content language evidence", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "anyOf": [ { "const": "video", "type": "string" }, { "const": "audio", "type": "string" } ] }, { "const": "release", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["currentContentLanguageSupport", "items", "nextCursor"], "properties": { "currentContentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["source", "unit", "contentLanguageSupport", "occurrence"], "properties": { "source": { "default": "parent", "type": "string", "enum": [ "parent", "main", "variant", "release", "occurrence", "adapted_audio" ] }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "kind", "language", "title"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "book", "type": "string", "enum": ["book", "software", "media", "video", "audio", "release"] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "occurrence": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["structureId", "nodeId"], "properties": { "structureId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" } } }, { "type": "null" } ] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByTypeByUnitIdContent-language-supportEvidence", "x-rezics-quota-route-operation-id": "getApiUnitsByTypeByUnitIdContent-language-supportEvidence", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}": { "get": { "summary": "Get unit", "tags": ["Units"], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "anyOf": [ { "const": "video", "type": "string" }, { "const": "audio", "type": "string" } ] }, { "const": "release", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByTypeByUnitId", "x-rezics-quota-route-operation-id": "getApiUnitsByTypeByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update unit", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "anyOf": [ { "const": "video", "type": "string" }, { "const": "audio", "type": "string" } ] }, { "const": "release", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["updatedAt"], "properties": { "updatedAt": { "format": "date-time", "type": "string" }, "bookChapterDraftScope": { "type": "string", "enum": ["book_only", "manageable_published_chapters"] }, "status": { "type": "string", "enum": ["draft", "published", "archived"] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "contentRating": { "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "aiDisclosure": { "type": "string", "enum": ["unknown", "none", "ai_assisted", "ai_originated", "machine_generated"] }, "licenses": { "uniqueItems": true, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "unit": { "additionalProperties": false, "type": "object", "properties": { "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } }, "details": { "additionalProperties": false, "type": "object", "properties": { "isbn13": { "nullable": true, "anyOf": [ { "pattern": "^[0-9]{13}$", "type": "string" }, { "type": "null" } ] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "metadataOnly": { "type": "boolean" }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "kind": { "minLength": 1, "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired", "UnitLicenseNotApplicable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden", "UnitLicenseGrantForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitChanged", "type": "string", "enum": [ "UnitChanged", "UnitLicenseGrantConflict", "UnitLicenseOfferingEndForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": [ "ValidationError", "UnitContentLanguageSupportInvalid", "VideoAudioTrackInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsByTypeByUnitId", "x-rezics-quota-route-operation-id": "patchApiUnitsByTypeByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/variant-context": { "patch": { "summary": "Update Unit Main relationship", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": ["book", "software", "media"] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["mainUnitId", "expectedMainUnitId"], "properties": { "mainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "expectedMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitVariantKindMismatch", "type": "string", "enum": [ "UnitVariantKindMismatch", "UnitVariantTargetIsVariant", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantChanged", "UnitVariantMainUnavailable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsByTypeByUnitIdVariant-context", "x-rezics-quota-route-operation-id": "patchApiUnitsByTypeByUnitIdVariant-context", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/variant-context/promote": { "post": { "summary": "Promote Unit Variant to Main", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": ["book", "software", "media"] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedMainUnitId"], "properties": { "expectedMainUnitId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitVariantKindMismatch", "type": "string", "enum": [ "UnitVariantKindMismatch", "UnitVariantTargetIsVariant", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantChanged", "UnitVariantMainUnavailable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByTypeByUnitIdVariant-contextPromote", "x-rezics-quota-route-operation-id": "postApiUnitsByTypeByUnitIdVariant-contextPromote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/localizations/{language}": { "put": { "summary": "Create or replace unit localization", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "anyOf": [ { "const": "video", "type": "string" }, { "const": "audio", "type": "string" } ] }, { "const": "release", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["title"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "type", "status", "visibility", "language", "contentLanguageSupport", "contentRating", "aiDisclosure", "licenses", "licenseOfferings", "postTargetingLocked", "publishedAt", "attributions", "createdAt", "updatedAt", "releasedOn", "details", "avatar", "banner", "cover", "localizations", "subjectAssociations", "externalLinks", "tags", "progressStatistics", "versions", "variantContext", "ownershipMode", "ownershipClaim", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string", "enum": ["book", "software", "media", "series", "video", "audio", "release"] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contentLanguageSupport": { "maxItems": 64, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$", "type": "string" }, "channels": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "text", "type": "string", "enum": ["text", "audio", "subtitle", "interface"] } } } } }, "contentRating": { "type": "string" }, "aiDisclosure": { "type": "string" }, "licenses": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "licenseId", "grantedByProfileId", "grantedAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" } } } }, "licenseOfferings": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "licenseId", "grantedByProfileId", "grantedAt", "recognitionStatus" ], "properties": { "id": { "format": "uuid", "type": "string" }, "licenseId": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] }, "grantedByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "grantedAt": { "format": "date-time", "type": "string" }, "recognitionStatus": { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] } } } }, "postTargetingLocked": { "type": "boolean" }, "publishedAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar", "creditedBookCount", "followerCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "creditedBookCount": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "followerCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "details": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "isbn13", "publicationDate", "pageCount", "wordCount", "publishedContentMetrics" ], "properties": { "type": { "const": "book", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "isbn13": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "publicationDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "pageCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "wordCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "publishedContentMetrics": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "language", "chapterCount", "wordCount", "characterCount" ], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "chapterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "metadataOnly", "releaseDate", "versionLabel"], "properties": { "type": { "const": "software", "type": "string" }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "versionLabel": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "releaseStatus", "metadataOnly", "releaseDate", "kind", "runtimeMinutes", "episodeCount", "seasonCount" ], "properties": { "type": { "const": "media", "type": "string" }, "releaseStatus": { "type": "string", "enum": ["ongoing", "hiatus", "completed", "cancelled"] }, "metadataOnly": { "type": "boolean" }, "releaseDate": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "runtimeMinutes": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "episodeCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "seasonCount": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "kind"], "properties": { "type": { "const": "series", "type": "string" }, "kind": { "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds", "adaptedAudioUnitIds"], "properties": { "type": { "const": "video", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "adaptedAudioUnitIds": { "nullable": true, "anyOf": [ { "maxItems": 64, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "durationSeconds"], "properties": { "type": { "const": "audio", "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["type", "parentUnitId", "versionLabel", "releasedOn"], "properties": { "type": { "const": "release", "type": "string" }, "parentUnitId": { "format": "uuid", "type": "string" }, "versionLabel": { "minLength": 1, "type": "string" }, "releasedOn": { "nullable": true, "anyOf": [{ "format": "date", "type": "string" }, { "type": "null" }] } } } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": [ "id", "entityEntryId", "entityKind", "role", "position", "language", "title", "summary", "avatar", "cover", "tags", "contextPost", "spoiler" ], "properties": { "id": { "format": "uuid", "type": "string" }, "entityEntryId": { "format": "uuid", "type": "string" }, "entityKind": { "default": "person", "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "tags": { "maxItems": 4, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["tagId", "title"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] }, "spoiler": { "type": "object", "required": [ "level", "concealed", "voteCount", "distribution", "viewerLevel" ], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "tags": { "type": "array", "items": { "type": "object", "required": [ "id", "tagId", "realmId", "score", "voteCount", "pinned", "position", "title", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "progressStatistics": { "nullable": true, "anyOf": [ { "type": "object", "required": ["active", "backlog"], "properties": { "active": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "backlog": { "$id": "CountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value", "asOf"], "properties": { "kind": { "const": "estimate", "type": "string" }, "value": { "minimum": 0, "type": "integer" }, "asOf": { "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" }, "modifiedSinceAnalyze": { "minimum": 0, "type": "integer" }, "relativeError": { "minimum": 0, "type": "number" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } }, { "type": "null" } ] }, "versions": { "type": "array", "items": { "type": "object", "required": ["id", "kind", "canonicalUnitId"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string" }, "canonicalUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canUpdateMetadataOnly", "canManageAccess", "canManageAssociations", "canCurateTags", "canCurateReferences", "canManageRealmPublications", "hasDevelopmentPreviewAccess" ], "properties": { "canEdit": { "type": "boolean" }, "canUpdateMetadataOnly": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageAssociations": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canCurateReferences": { "type": "object", "required": ["aliases", "externalLinks"], "properties": { "aliases": { "type": "boolean" }, "externalLinks": { "type": "boolean" } } }, "canManageRealmPublications": { "type": "boolean" }, "hasDevelopmentPreviewAccess": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ApiTokenPermissionRequired", "type": "string", "enum": [ "ApiTokenPermissionRequired", "EmailVerificationRequired", "AccountRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdLocalizationsByLanguage", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdLocalizationsByLanguage", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/contribution-resources/me": { "get": { "operationId": "listCurrentUserContributionResources", "summary": "List public resources the current user has created or contributed to", "tags": ["History"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "section", "in": "query", "required": true, "schema": { "type": "string", "enum": [ "book", "software", "media", "entity", "tag", "realm", "zone", "post", "wiki", "collection", "review", "poll" ] } }, { "name": "kind", "in": "query", "required": false, "schema": { "default": "all", "type": "string", "enum": ["all", "created", "contributed"] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "section", "language", "title", "cover", "status", "visibility", "createdResourceAt", "firstContributedAt", "lastContributedAt", "contributionCount", "lastParticipatedAt", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "section": { "type": "string", "enum": [ "book", "software", "media", "entity", "tag", "realm", "zone", "post", "wiki", "collection", "review", "poll" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "status": { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, "visibility": { "default": "public", "type": "string", "enum": ["public", "unlisted", "private"] }, "createdResourceAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "firstContributedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "lastContributedAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "contributionCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "lastParticipatedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "getApiHistoryContribution-resourcesMe", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/units/{unitId}/revisions": { "get": { "summary": "List Unit revisions", "tags": ["History"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "parentRevisionId", "actorProfileId", "actorName", "primaryContribution", "editSummary", "minor", "byteSize", "sizeDelta", "createdAt", "tags", "visibility", "contentAvailable", "parentContentAvailable", "isCurrent" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "actorProfileId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "actorName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "primaryContribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "creditAttribution"], "properties": { "kind": { "const": "ai", "type": "string" }, "creditAttribution": { "additionalProperties": false, "type": "object", "required": ["creditedEntityId", "role", "assurance"], "properties": { "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": [ "creator", "editor", "translator", "researcher" ] }, "assurance": { "default": "self_declared", "type": "string", "enum": [ "self_declared", "credential_bound", "server_observed" ] } } } } } ] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "byteSize": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "sizeDelta": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "visibility": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "visible", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "hidden", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "suppressed", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } } ] }, "contentAvailable": { "type": "boolean" }, "parentContentAvailable": { "type": "boolean" }, "isCurrent": { "type": "boolean" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "object", "required": ["capabilities"], "properties": { "capabilities": { "type": "object", "required": ["canRestore", "canModerate", "canSuppress"], "properties": { "canRestore": { "type": "boolean" }, "canModerate": { "type": "boolean" }, "canSuppress": { "type": "boolean" } } } } } ] } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidHistoryCursor", "type": "string", "enum": ["InvalidHistoryCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryUnitsByUnitIdRevisions", "x-rezics-quota-route-operation-id": "getApiHistoryUnitsByUnitIdRevisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/unit-revisions/{revisionId}": { "get": { "summary": "Get Unit revision", "tags": ["History"], "parameters": [ { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "type": "object", "required": [ "id", "unitId", "parentRevisionId", "actorProfileId", "actorName", "primaryContribution", "editSummary", "minor", "byteSize", "sizeDelta", "createdAt", "tags", "visibility", "contentAvailable", "parentContentAvailable", "isCurrent" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "primaryContribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "creditAttribution"], "properties": { "kind": { "const": "ai", "type": "string" }, "creditAttribution": { "additionalProperties": false, "type": "object", "required": ["creditedEntityId", "role", "assurance"], "properties": { "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] }, "assurance": { "default": "self_declared", "type": "string", "enum": [ "self_declared", "credential_bound", "server_observed" ] } } } } } ] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "byteSize": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "sizeDelta": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "visibility": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "visible", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "hidden", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "suppressed", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } } ] }, "contentAvailable": { "type": "boolean" }, "parentContentAvailable": { "type": "boolean" }, "isCurrent": { "type": "boolean" } } }, { "type": "object", "required": ["slots"], "properties": { "slots": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": ["role", "model", "originRevisionId", "content"], "properties": { "role": { "anyOf": [ { "const": "main", "type": "string" }, { "const": "content_language_support", "type": "string" }, { "const": "relations", "type": "string" }, { "const": "structure", "type": "string" }, { "const": "rules", "type": "string" } ] }, "model": { "type": "string" }, "originRevisionId": { "format": "uuid", "type": "string" }, "content": { "nullable": true, "anyOf": [{}, { "type": "null" }] } } }, { "type": "object", "required": [ "role", "language", "model", "originRevisionId", "content" ], "properties": { "role": { "const": "localization", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "model": { "type": "string" }, "originRevisionId": { "format": "uuid", "type": "string" }, "content": { "nullable": true, "anyOf": [{}, { "type": "null" }] } } } ] } } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryUnit-revisionsByRevisionId", "x-rezics-quota-route-operation-id": "getApiHistoryUnit-revisionsByRevisionId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/units/{unitId}/compare": { "get": { "summary": "Compare Unit revisions", "tags": ["History"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "from", "in": "query", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "to", "in": "query", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["fromRevisionId", "toRevisionId", "changes"], "properties": { "fromRevisionId": { "format": "uuid", "type": "string" }, "toRevisionId": { "format": "uuid", "type": "string" }, "changes": { "type": "array", "items": { "type": "object", "required": ["path"], "properties": { "path": { "type": "string" }, "before": {}, "after": {} } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryUnitsByUnitIdCompare", "x-rezics-quota-route-operation-id": "getApiHistoryUnitsByUnitIdCompare", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/units/{unitId}/revisions/{revisionId}/restore": { "post": { "summary": "Restore Unit revision", "tags": ["History"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "editSummary": { "maxLength": 500, "type": "string" }, "minor": { "default": false, "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["unitId", "revisionId", "revisionCreated"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired", "ZoneThemeReferenceInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "EntityAssociationRestricted", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "UnitRevisionNotFound", "EntityEntryNotFound", "ImageAssetNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiHistoryUnitsByUnitIdRevisionsByRevisionIdRestore", "x-rezics-quota-route-operation-id": "postApiHistoryUnitsByUnitIdRevisionsByRevisionIdRestore", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/units/{unitId}/revisions/{revisionId}/undo": { "post": { "summary": "Undo Unit revision", "tags": ["History"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "editSummary": { "maxLength": 500, "type": "string" }, "minor": { "default": false, "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["unitId", "revisionId", "revisionCreated"], "properties": { "unitId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired", "ZoneThemeReferenceInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "EntityAssociationRestricted", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "UnitRevisionNotFound", "EntityEntryNotFound", "ImageAssetNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiHistoryUnitsByUnitIdRevisionsByRevisionIdUndo", "x-rezics-quota-route-operation-id": "postApiHistoryUnitsByUnitIdRevisionsByRevisionIdUndo", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/unit-revisions/{revisionId}/visibility": { "patch": { "summary": "Update revision visibility", "tags": ["History"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["visibility", "rules"], "properties": { "visibility": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "visible", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "hidden", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "suppressed", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } } ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } } } } } }, "required": true }, "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "GovernanceRuleSourceForbidden", "type": "string", "enum": ["GovernanceRuleSourceForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionNotFound", "type": "string", "enum": ["UnitRevisionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CurrentRevisionContentVisibilityForbidden", "type": "string", "enum": [ "CurrentRevisionContentVisibilityForbidden", "GovernanceRuleChanged" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiHistoryUnit-revisionsByRevisionIdVisibility", "x-rezics-quota-route-operation-id": "patchApiHistoryUnit-revisionsByRevisionIdVisibility", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/recent-changes": { "get": { "summary": "List recent changes", "tags": ["History"], "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } }, { "name": "tag", "in": "query", "required": false, "schema": { "type": "string", "enum": ["mw-undo", "mw-manual-revert"] } }, { "name": "minor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "format": "boolean", "default": false, "type": "string" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "parentRevisionId", "actorProfileId", "actorName", "primaryContribution", "editSummary", "minor", "byteSize", "sizeDelta", "createdAt", "tags", "visibility", "contentAvailable", "parentContentAvailable", "isCurrent" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "primaryContribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "creditAttribution"], "properties": { "kind": { "const": "ai", "type": "string" }, "creditAttribution": { "additionalProperties": false, "type": "object", "required": ["creditedEntityId", "role", "assurance"], "properties": { "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] }, "assurance": { "default": "self_declared", "type": "string", "enum": [ "self_declared", "credential_bound", "server_observed" ] } } } } } ] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "byteSize": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "sizeDelta": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "visibility": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "visible", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "hidden", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "suppressed", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } } ] }, "contentAvailable": { "type": "boolean" }, "parentContentAvailable": { "type": "boolean" }, "isCurrent": { "type": "boolean" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidHistoryCursor", "type": "string", "enum": ["InvalidHistoryCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryRecent-changes", "x-rezics-quota-route-operation-id": "getApiHistoryRecent-changes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/contributions/{profileId}": { "get": { "summary": "List profile contributions", "tags": ["History"], "parameters": [ { "name": "profileId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } }, { "name": "tag", "in": "query", "required": false, "schema": { "type": "string", "enum": ["mw-undo", "mw-manual-revert"] } }, { "name": "minor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "format": "boolean", "default": false, "type": "string" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "parentRevisionId", "actorProfileId", "actorName", "primaryContribution", "editSummary", "minor", "byteSize", "sizeDelta", "createdAt", "tags", "visibility", "contentAvailable", "parentContentAvailable", "isCurrent" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "primaryContribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "creditAttribution"], "properties": { "kind": { "const": "ai", "type": "string" }, "creditAttribution": { "additionalProperties": false, "type": "object", "required": ["creditedEntityId", "role", "assurance"], "properties": { "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] }, "assurance": { "default": "self_declared", "type": "string", "enum": [ "self_declared", "credential_bound", "server_observed" ] } } } } } ] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "byteSize": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "sizeDelta": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "visibility": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "visible", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "hidden", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "hiddenFields"], "properties": { "kind": { "const": "suppressed", "type": "string" }, "hiddenFields": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "content", "type": "string", "enum": ["content", "summary", "actor"] } } } } ] }, "contentAvailable": { "type": "boolean" }, "parentContentAvailable": { "type": "boolean" }, "isCurrent": { "type": "boolean" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidHistoryCursor", "type": "string", "enum": ["InvalidHistoryCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryContributionsByProfileId", "x-rezics-quota-route-operation-id": "getApiHistoryContributionsByProfileId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/history/change-tags": { "get": { "summary": "List revision change tags", "tags": ["History"], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["tag"], "properties": { "tag": { "type": "string" } } } } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiHistoryChange-tags", "x-rezics-quota-route-operation-id": "getApiHistoryChange-tags", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities": { "get": { "summary": "List entity entries", "tags": ["Entity"], "parameters": [ { "name": "creditAttributionSearch", "in": "query", "required": false, "schema": { "type": "string", "enum": ["direct", "public"] } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": "string", "enum": ["person", "organization", "character", "software_agent"] } }, { "name": "query", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 200, "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "verified", "language", "avatar", "banner", "cover", "title", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "verified": { "type": "boolean" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiEntities", "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "getApiEntities", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create entity entry", "tags": ["Entity"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["ownershipMode", "localization"], "properties": { "ownershipMode": { "type": "string", "enum": ["profile_owned", "community_owned"] }, "kind": { "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiEntities", "x-rezics-quota-route-operation-id": "postApiEntities", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities/{unitId}": { "get": { "summary": "Get entity entry", "tags": ["Entity"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "kind", "verified", "ownershipMode", "ownershipClaim", "language", "avatar", "banner", "cover", "createdAt", "updatedAt", "localizations", "attributions", "owner", "externalLinks", "variantContext", "measurements", "capabilities", "creditAttributions", "subjectAssociations" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "type": "string", "enum": ["person", "organization", "character", "software_agent"] }, "verified": { "type": "boolean" }, "ownershipMode": { "default": "profile_owned", "type": "string", "enum": ["profile_owned", "community_owned"] }, "ownershipClaim": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["id", "state", "details", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "state": { "const": "pending", "type": "string" }, "details": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, { "type": "null" } ] }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "owner": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, { "type": "null" } ] }, "externalLinks": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "variantContext": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "const": "standalone", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["role", "variants"], "properties": { "role": { "const": "main", "type": "string" }, "variants": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["role", "relationUpdatedAt", "main"], "properties": { "role": { "const": "variant", "type": "string" }, "relationUpdatedAt": { "format": "date-time", "type": "string" }, "main": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } } ] } } } ] }, "measurements": { "type": "array", "items": { "type": "object", "required": [ "id", "contextUnitId", "heightMillimetres", "weightGrams", "bustMillimetres", "waistMillimetres", "hipsMillimetres", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "contextUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "heightMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "weightGrams": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "bustMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "waistMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "hipsMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canEditCreditAttributions", "canCurateTags", "canManageVariants", "canManageAccess", "canManageCreditAssociations", "canManageSubjectAssociations" ], "properties": { "canEdit": { "type": "boolean" }, "canEditCreditAttributions": { "type": "boolean" }, "canCurateTags": { "type": "boolean" }, "canManageVariants": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageCreditAssociations": { "type": "boolean" }, "canManageSubjectAssociations": { "type": "boolean" } } }, "creditAttributions": { "type": "array", "items": { "type": "object", "required": ["id", "sourceUnitId", "role"], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceUnitId": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] } } } }, "subjectAssociations": { "type": "array", "items": { "type": "object", "required": ["id", "unitId", "role", "contextPost"], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "contextPost": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "subjectId", "title", "tags"], "properties": { "id": { "format": "uuid", "type": "string" }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "title", "score", "voteCount", "pinned" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "type": "boolean" } } } } } }, { "type": "null" } ] } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "EntityEntryNotFound", "type": "string", "enum": ["EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiEntitiesByUnitId", "x-rezics-quota-route-operation-id": "getApiEntitiesByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities/{unitId}/measurements": { "put": { "summary": "Create or replace a canonical Entity measurement set", "tags": ["Entity"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "heightMillimetres", "weightGrams", "bustMillimetres", "waistMillimetres", "hipsMillimetres" ], "properties": { "contextUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "heightMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "maximum": 2147483647, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 2147483647, "type": "integer" } ] }, { "type": "null" } ] }, "weightGrams": { "nullable": true, "anyOf": [ { "minimum": 1, "maximum": 2147483647, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 2147483647, "type": "integer" } ] }, { "type": "null" } ] }, "bustMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "maximum": 2147483647, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 2147483647, "type": "integer" } ] }, { "type": "null" } ] }, "waistMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "maximum": 2147483647, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 2147483647, "type": "integer" } ] }, { "type": "null" } ] }, "hipsMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "maximum": 2147483647, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 2147483647, "type": "integer" } ] }, { "type": "null" } ] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "contextUnitId", "heightMillimetres", "weightGrams", "bustMillimetres", "waistMillimetres", "hipsMillimetres", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "contextUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "heightMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "weightGrams": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "bustMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "waistMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "hipsMillimetres": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiEntitiesByUnitIdMeasurements", "x-rezics-quota-route-operation-id": "putApiEntitiesByUnitIdMeasurements", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities/{unitId}/variant-context": { "patch": { "summary": "Update Entity Main relationship", "tags": ["Entity"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["mainUnitId", "expectedMainUnitId"], "properties": { "mainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "expectedMainUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitVariantChanged", "type": "string", "enum": [ "UnitVariantChanged", "UnitVariantKindMismatch", "UnitVariantMainUnavailable", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantTargetIsVariant" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiEntitiesByUnitIdVariant-context", "x-rezics-quota-route-operation-id": "patchApiEntitiesByUnitIdVariant-context", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities/{unitId}/variant-context/promote": { "post": { "summary": "Promote Entity Variant to Main", "tags": ["Entity"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["expectedMainUnitId"], "properties": { "expectedMainUnitId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitVariantChanged", "type": "string", "enum": [ "UnitVariantChanged", "UnitVariantKindMismatch", "UnitVariantMainUnavailable", "UnitVariantSourceHasVariants", "UnitVariantGroupLimitReached", "UnitVariantTargetIsVariant" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiEntitiesByUnitIdVariant-contextPromote", "x-rezics-quota-route-operation-id": "postApiEntitiesByUnitIdVariant-contextPromote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/entities/{unitId}/localizations/{language}": { "put": { "summary": "Create or replace entity localization", "tags": ["Entity"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["title"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiEntitiesByUnitIdLocalizationsByLanguage", "x-rezics-quota-route-operation-id": "putApiEntitiesByUnitIdLocalizationsByLanguage", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags": { "get": { "summary": "List tags", "tags": ["Tags"], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["id", "language", "title", "summary"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTags", "x-rezics-quota-route-operation-id": "getApiTags", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create tag", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["localization"], "properties": { "kind": { "minLength": 1, "maxLength": 64, "type": "string" }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiTags", "x-rezics-quota-route-operation-id": "postApiTags", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags/{tagId}": { "get": { "summary": "Get tag detail", "tags": ["Tags"], "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "language", "avatar", "createdAt", "updatedAt", "localizations", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "minItems": 1, "type": "array", "items": { "type": "object", "required": [ "unitId", "language", "position", "title", "summary", "description", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "description": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "capabilities": { "type": "object", "required": ["canEdit"], "properties": { "canEdit": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagNotFound", "type": "string", "enum": ["TagNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiTagsByTagId", "x-rezics-quota-route-operation-id": "getApiTagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/tags/{tagId}/localizations/{language}": { "put": { "summary": "Create or replace tag localization", "tags": ["Tags"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["title"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiTagsByTagIdLocalizationsByLanguage", "x-rezics-quota-route-operation-id": "putApiTagsByTagIdLocalizationsByLanguage", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/aliases": { "get": { "summary": "List Unit alias references", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor", "curationVersion"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "unitId", "term", "normalizedTerm", "language", "kind", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "term": { "type": "string" }, "normalizedTerm": { "type": "string" }, "language": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "curationVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceLimitReached", "type": "string", "enum": ["UnitReferenceLimitReached"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByTypeByUnitIdAliases", "x-rezics-quota-route-operation-id": "getApiUnitsByTypeByUnitIdAliases", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Propose Unit alias", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["term"], "properties": { "term": { "minLength": 1, "maxLength": 500, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "kind": { "type": "string", "enum": [ "common", "abbreviation", "transliteration", "alternate_title", "legacy_title", "misspelling", "other" ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "term", "normalizedTerm", "language", "kind", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "term": { "type": "string" }, "normalizedTerm": { "type": "string" }, "language": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceLimitReached", "type": "string", "enum": ["UnitReferenceLimitReached", "UnitReferenceWithdrawn"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByTypeByUnitIdAliases", "x-rezics-quota-route-operation-id": "postApiUnitsByTypeByUnitIdAliases", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/aliases/{aliasId}/vote": { "put": { "summary": "Vote on Unit alias", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "aliasId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "AliasNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdAliasesByAliasIdVote", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdAliasesByAliasIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit alias vote", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "aliasId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "AliasNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdAliasesByAliasIdVote", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdAliasesByAliasIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/aliases/{aliasId}": { "patch": { "summary": "Update Unit Alias curation", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "aliasId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["baseVersion", "pinned", "position"], "properties": { "baseVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "const": true, "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["baseVersion", "pinned", "position"], "properties": { "baseVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "const": false, "type": "boolean" }, "position": { "type": "null" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["reference", "curationVersion"], "properties": { "reference": { "type": "object", "required": [ "id", "unitId", "term", "normalizedTerm", "language", "kind", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "term": { "type": "string" }, "normalizedTerm": { "type": "string" }, "language": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "kind": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "curationVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "AliasNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceCurationChanged", "type": "string", "enum": [ "UnitReferenceCurationChanged", "UnitReferencePinnedLimitReached" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsByTypeByUnitIdAliasesByAliasId", "x-rezics-quota-route-operation-id": "patchApiUnitsByTypeByUnitIdAliasesByAliasId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Withdraw Unit alias reference", "tags": ["Units"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "AliasNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceCurationChanged", "type": "string", "enum": ["UnitReferenceCurationChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "aliasId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "baseVersion", "in": "query", "required": true, "schema": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } ], "operationId": "deleteApiUnitsByTypeByUnitIdAliasesByAliasId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdAliasesByAliasId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/credit-attributions": { "post": { "summary": "Add Unit credit attribution", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "default": "book", "type": "string", "enum": [ "book", "software", "media", "series", "entity", "collection", "release", "video", "audio" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["creditedUnitId", "role"], "properties": { "creditedUnitId": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CreditAttributionRoleInvalid", "type": "string", "enum": [ "CreditAttributionRoleInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByTypeByUnitIdCredit-attributions", "x-rezics-quota-route-operation-id": "postApiUnitsByTypeByUnitIdCredit-attributions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/credit-attributions/{associationId}": { "delete": { "summary": "Remove Unit credit attribution", "tags": ["Units"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "CreditAttributionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "default": "book", "type": "string", "enum": [ "book", "software", "media", "series", "entity", "collection", "release", "video", "audio" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "associationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiUnitsByTypeByUnitIdCredit-attributionsByAssociationId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdCredit-attributionsByAssociationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/subject-associations": { "post": { "summary": "Add Unit subject association", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["entityId", "role"], "properties": { "entityId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "unitId", "entityId", "contextPostId", "role", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "entityId": { "format": "uuid", "type": "string" }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "role": { "default": "primary_character", "type": "string", "enum": [ "primary_character", "featured_character", "appears", "about", "setting", "source_work", "canonical_wiki_page", "related_subject" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AssociationContextPostInvalid", "type": "string", "enum": [ "AssociationContextPostInvalid", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByTypeByUnitIdSubject-associations", "x-rezics-quota-route-operation-id": "postApiUnitsByTypeByUnitIdSubject-associations", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/subject-associations/{associationId}/spoiler": { "put": { "summary": "Judge the spoiler level of a subject association", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "associationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["spoilerLevel"], "properties": { "spoilerLevel": { "type": "string", "enum": [0, 1, 2] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "associationId", "level", "voteCount", "distribution", "viewerLevel" ], "properties": { "associationId": { "format": "uuid", "type": "string" }, "level": { "type": "string", "enum": [0, 1, 2] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SubjectAssociationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdSubject-associationsByAssociationIdSpoiler", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdSubject-associationsByAssociationIdSpoiler", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Clear a subject-association spoiler judgment", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "associationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "associationId", "level", "voteCount", "distribution", "viewerLevel" ], "properties": { "associationId": { "format": "uuid", "type": "string" }, "level": { "type": "string", "enum": [0, 1, 2] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "distribution": { "type": "object", "required": ["none", "minor", "major"], "properties": { "none": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "minor": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "major": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, "viewerLevel": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, { "type": "null" } ] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SubjectAssociationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdSubject-associationsByAssociationIdSpoiler", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdSubject-associationsByAssociationIdSpoiler", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/subject-associations/{associationId}": { "delete": { "summary": "Remove Unit subject association", "tags": ["Units"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "SubjectAssociationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "associationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiUnitsByTypeByUnitIdSubject-associationsByAssociationId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdSubject-associationsByAssociationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/external-links": { "get": { "summary": "List Unit external-link references", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "nextCursor", "curationVersion"], "properties": { "items": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt", "sourceEntity" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "sourceEntity": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "curationVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceLimitReached", "type": "string", "enum": ["UnitReferenceLimitReached"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsByTypeByUnitIdExternal-links", "x-rezics-quota-route-operation-id": "getApiUnitsByTypeByUnitIdExternal-links", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Propose Unit external link", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["url", "sourceEntityId"], "properties": { "url": { "format": "uri", "pattern": "^[Hh][Tt][Tt][Pp][Ss]?://", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceLimitReached", "type": "string", "enum": ["UnitReferenceLimitReached", "UnitReferenceWithdrawn"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsByTypeByUnitIdExternal-links", "x-rezics-quota-route-operation-id": "postApiUnitsByTypeByUnitIdExternal-links", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/external-links/{externalLinkId}/vote": { "put": { "summary": "Vote on Unit external link", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "externalLinkId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitExternalLinkNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdExternal-linksByExternalLinkIdVote", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdExternal-linksByExternalLinkIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit external link vote", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "externalLinkId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitExternalLinkNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdExternal-linksByExternalLinkIdVote", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdExternal-linksByExternalLinkIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/external-links/{externalLinkId}": { "patch": { "summary": "Update Unit external link curation", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "externalLinkId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["baseVersion", "pinned", "position"], "properties": { "baseVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "const": true, "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["baseVersion", "pinned", "position"], "properties": { "baseVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "pinned": { "const": false, "type": "boolean" }, "position": { "type": "null" } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["reference", "curationVersion"], "properties": { "reference": { "additionalProperties": false, "type": "object", "required": [ "id", "unitId", "sourceEntityId", "url", "normalizedUrl", "normalizedUrlHash", "createdByProfileId", "voteSummary", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "sourceEntityId": { "format": "uuid", "type": "string" }, "url": { "type": "string" }, "normalizedUrl": { "type": "string" }, "normalizedUrlHash": { "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "voteSummary": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] } } }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "curationVersion": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitExternalLinkNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceCurationChanged", "type": "string", "enum": [ "UnitReferenceCurationChanged", "UnitReferencePinnedLimitReached" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsByTypeByUnitIdExternal-linksByExternalLinkId", "x-rezics-quota-route-operation-id": "patchApiUnitsByTypeByUnitIdExternal-linksByExternalLinkId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Withdraw Unit external-link reference", "tags": ["Units"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "UnitExternalLinkNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitReferenceCurationChanged", "type": "string", "enum": ["UnitReferenceCurationChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "externalLinkId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "baseVersion", "in": "query", "required": true, "schema": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } ], "operationId": "deleteApiUnitsByTypeByUnitIdExternal-linksByExternalLinkId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdExternal-linksByExternalLinkId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/tags/{tagId}": { "put": { "summary": "Tag unit", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": {} } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "tagId", "createdByProfileId", "score", "voteCount", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": [ "UnitAccessRestricted", "UnitPermissionForbidden", "ContentLabelPlatformApplyForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagNotFound", "TagApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagNotDirectlyApplicable", "type": "string", "enum": ["TagNotDirectlyApplicable", "ContentLabelApplicationInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update Unit tag curation", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["pinned", "position", "updatedAt", "expectedFeaturedTagIds"], "properties": { "pinned": { "const": true, "type": "boolean" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "expectedFeaturedTagIds": { "type": "array", "items": { "format": "uuid", "type": "string" } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["pinned", "position", "updatedAt", "expectedFeaturedTagIds"], "properties": { "pinned": { "const": false, "type": "boolean" }, "position": { "type": "null" }, "updatedAt": { "format": "date-time", "type": "string" }, "expectedFeaturedTagIds": { "type": "array", "items": { "format": "uuid", "type": "string" } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "unitId", "tagId", "createdByProfileId", "score", "voteCount", "pinned", "position", "createdAt", "updatedAt" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "pinned": { "type": "boolean" }, "position": { "nullable": true, "anyOf": [ { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitTagCurationChanged", "type": "string", "enum": [ "UnitTagCurationChanged", "ContentLabelPlatformIdentityImmutable" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagNotDirectlyApplicable", "type": "string", "enum": ["TagNotDirectlyApplicable", "ContentLabelApplicationInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-route-operation-id": "patchApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit tag", "tags": ["Units"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": [ "UnitPermissionForbidden", "UnitAccessRestricted", "ContentLabelPlatformRemovalForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "TagApplicationHasJudgments", "type": "string", "enum": ["TagApplicationHasJudgments"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdTagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/{type}/{unitId}/tags/{tagId}/vote": { "put": { "summary": "Vote on Unit tag", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidTagPath", "type": "string", "enum": ["InvalidTagPath", "ContentLabelJudgmentForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsByTypeByUnitIdTagsByTagIdVote", "x-rezics-quota-route-operation-id": "putApiUnitsByTypeByUnitIdTagsByTagIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit tag vote", "tags": ["Units"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "type", "in": "path", "required": true, "schema": { "anyOf": [ { "anyOf": [ { "anyOf": [ { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" } ] }, { "const": "series", "type": "string" } ] }, { "const": "entity", "type": "string" } ] } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "positiveCount", "negativeCount", "score", "voteCount", "viewerVote", "asOf" ], "properties": { "positiveCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "negativeCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "asOf": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitAccessRestricted", "type": "string", "enum": ["UnitAccessRestricted", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "TagApplicationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsByTypeByUnitIdTagsByTagIdVote", "x-rezics-quota-route-operation-id": "deleteApiUnitsByTypeByUnitIdTagsByTagIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures": { "get": { "summary": "List Unit Content Structures", "tags": ["Content Structure"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "ownerUnitId", "kind", "documentKey", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "kind": { "default": "book.contents", "type": "string", "enum": [ "book.contents", "media.contents", "post.contents", "realm.taxonomy", "wiki.navigation", "zone.navigation", "page-structure" ] }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdContent-structures", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdContent-structures", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Content Structure", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "type": "string", "enum": ["book.contents", "media.contents", "post.contents", "realm.taxonomy"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["structure", "revisionCreated"], "properties": { "structure": { "type": "object", "required": [ "id", "ownerUnitId", "kind", "documentKey", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "kind": { "default": "book.contents", "type": "string", "enum": [ "book.contents", "media.contents", "post.contents", "realm.taxonomy", "wiki.navigation", "zone.navigation", "page-structure" ] }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBy-idByUnitIdContent-structures", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdContent-structures", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}": { "get": { "summary": "Get Content Structure", "tags": ["Content Structure"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "type": "object", "required": [ "id", "ownerUnitId", "kind", "documentKey", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "kind": { "default": "book.contents", "type": "string", "enum": [ "book.contents", "media.contents", "post.contents", "realm.taxonomy", "wiki.navigation", "zone.navigation", "page-structure" ] }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, { "type": "object", "required": ["nodes"], "properties": { "nodes": { "type": "array", "items": { "type": "object", "required": [ "id", "structureId", "ownerUnitId", "parentId", "contentUnitId", "documentKey", "target", "position", "contentRating", "realmTagQueryStrategy", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "structureId": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "type": "string" } } } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdContent-structuresByStructureId", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdContent-structuresByStructureId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete Content Structure", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "latestRevisionId", "revisionCreated"], "properties": { "updated": { "const": true, "type": "boolean" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsBy-idByUnitIdContent-structuresByStructureId", "x-rezics-quota-route-operation-id": "deleteApiUnitsBy-idByUnitIdContent-structuresByStructureId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}/revisions": { "get": { "summary": "List Content Structure revisions", "tags": ["Content Structure"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentRevisionId", "sourceRevisionId", "actorProfileId", "kind", "editSummary", "minor", "replayByteSize", "checkpointByteSize", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "sourceRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "kind": { "default": "create", "type": "string", "enum": ["create", "update", "delete", "restore"] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "replayByteSize": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "checkpointByteSize": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBy-idByUnitIdContent-structuresByStructureIdRevisions", "x-rezics-quota-route-operation-id": "getApiUnitsBy-idByUnitIdContent-structuresByStructureIdRevisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}/revisions/{revisionId}/restore": { "post": { "summary": "Restore a Content Structure revision", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "message": { "maxLength": 500, "type": "string" }, "minor": { "type": "boolean" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "latestRevisionId", "revisionCreated"], "properties": { "updated": { "const": true, "type": "boolean" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdRevisionsByRevisionIdRestore", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdRevisionsByRevisionIdRestore", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}/nodes/batch": { "post": { "summary": "Apply an atomic Content Structure node command batch", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId", "changes"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "changes": { "minItems": 1, "maxItems": 10000, "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["opId", "type", "nodeId", "parentId", "contentUnitId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "node.create", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [ { "pattern": "^[0-9a-f]{12}$", "type": "string" }, { "type": "null" } ] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] }, "placement": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "default": "start", "type": "string", "enum": ["start", "end"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "nodeId"], "properties": { "kind": { "default": "before", "type": "string", "enum": ["before", "after"] }, "nodeId": { "format": "uuid", "type": "string" } } } ] }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "nodeId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "node.update", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [ { "pattern": "^[0-9a-f]{12}$", "type": "string" }, { "type": "null" } ] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "nodeId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "node.move", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "placement": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "default": "start", "type": "string", "enum": ["start", "end"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "nodeId"], "properties": { "kind": { "default": "before", "type": "string", "enum": ["before", "after"] }, "nodeId": { "format": "uuid", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "leftNodeId", "rightNodeId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "nodes.swap", "type": "string" }, "leftNodeId": { "format": "uuid", "type": "string" }, "rightNodeId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "nodeId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "node.deleteSubtree", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" } } } ] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["results", "latestRevisionId", "revisionCreated"], "properties": { "results": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["opId", "applied"], "properties": { "opId": { "type": "string" }, "applied": { "const": true, "type": "boolean" } } } }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesBatch", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesBatch", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}/nodes": { "post": { "summary": "Insert Content Structure node", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId", "content"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "parentId": { "format": "uuid", "type": "string" }, "content": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "language", "title"], "properties": { "kind": { "const": "label", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" } } } ] }, "documentKey": { "pattern": "^[0-9a-f]{12}$", "type": "string" }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "contentRating": { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, "realmTagQueryStrategy": { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["node", "latestRevisionId", "revisionCreated"], "properties": { "node": { "type": "object", "required": [ "id", "structureId", "ownerUnitId", "parentId", "contentUnitId", "documentKey", "target", "position", "contentRating", "realmTagQueryStrategy", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "structureId": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "type": "string" } } } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodes", "x-rezics-quota-route-operation-id": "postApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/by-id/{unitId}/content-structures/{structureId}/nodes/{nodeId}": { "patch": { "summary": "Update Content Structure node", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "minProperties": 2, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [{ "pattern": "^[0-9a-f]{12}$", "type": "string" }, { "type": "null" }] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "minLength": 1, "maxLength": 2000, "pattern": "^https://", "type": "string" } } } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["node", "latestRevisionId", "revisionCreated"], "properties": { "node": { "type": "object", "required": [ "id", "structureId", "ownerUnitId", "parentId", "contentUnitId", "documentKey", "target", "position", "contentRating", "realmTagQueryStrategy", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "structureId": { "format": "uuid", "type": "string" }, "ownerUnitId": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "documentKey": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "target": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "content", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "external", "type": "string" }, "url": { "type": "string" } } } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "contentRating": { "nullable": true, "anyOf": [ { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] }, { "type": "null" } ] }, "realmTagQueryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesByNodeId", "x-rezics-quota-route-operation-id": "patchApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesByNodeId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete Content Structure node subtree", "tags": ["Content Structure"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "structureId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "latestRevisionId", "revisionCreated"], "properties": { "updated": { "const": true, "type": "boolean" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitPermissionForbidden", "PlatformCapabilityRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesByNodeId", "x-rezics-quota-route-operation-id": "deleteApiUnitsBy-idByUnitIdContent-structuresByStructureIdNodesByNodeId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/book/{unitId}/content-structure/nodes": { "get": { "summary": "List book Content Structure nodes", "tags": ["Content Structure"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["ownershipMode", "structureId", "latestRevisionId", "items"], "properties": { "ownershipMode": { "type": "string", "enum": ["profile_owned", "community_owned"] }, "structureId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "position", "contentMetrics" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "book", "type": "string", "enum": ["book", "chapter", "label"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "contentMetrics": { "additionalProperties": false, "type": "object", "required": ["wordCount", "characterCount"], "properties": { "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "BookNotFound", "type": "string", "enum": ["BookNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsBookByUnitIdContent-structureNodes", "x-rezics-quota-route-operation-id": "getApiUnitsBookByUnitIdContent-structureNodes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/book/{unitId}/content-structure": { "put": { "summary": "Save a complete Book Content Structure draft", "tags": ["Content Structure"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId", "nodes"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "nodes": { "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "id", "parentId", "order", "title"], "properties": { "state": { "const": "existing", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "state", "id", "parentId", "order", "title", "language", "contentKind" ], "properties": { "state": { "const": "new", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "contentKind": { "const": "label", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "state", "id", "parentId", "order", "title", "language", "contentKind", "content", "status" ], "properties": { "state": { "const": "new", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "contentKind": { "const": "chapter", "type": "string" }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "status": { "anyOf": [ { "const": "draft", "type": "string" }, { "const": "published", "type": "string" } ] }, "ownershipMode": { "type": "string", "enum": ["profile_owned", "community_owned"] } } }, { "additionalProperties": false, "type": "object", "required": ["state", "id", "parentId", "order", "contentUnitId"], "properties": { "state": { "const": "attached", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "contentUnitId": { "format": "uuid", "type": "string" } } } ] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "ownershipMode", "structureId", "latestRevisionId", "revisionCreated", "items" ], "properties": { "ownershipMode": { "type": "string", "enum": ["profile_owned", "community_owned"] }, "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "position", "contentMetrics" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "book", "type": "string", "enum": ["book", "chapter", "label"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "contentMetrics": { "additionalProperties": false, "type": "object", "required": ["wordCount", "characterCount"], "properties": { "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PostTargetingLocked", "type": "string", "enum": [ "PostTargetingLocked", "PostTagMentionVoteConflict", "ContentStructureRevisionConflict" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsBookByUnitIdContent-structure", "x-rezics-quota-route-operation-id": "putApiUnitsBookByUnitIdContent-structure", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/media/{unitId}/content-structure/nodes": { "get": { "summary": "List Media Content Structure nodes", "tags": ["Content Structure"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "items"], "properties": { "state": { "const": "uninitialized", "type": "string" }, "items": { "type": "array", "minItems": 0, "maxItems": 0 } } }, { "additionalProperties": false, "type": "object", "required": ["state", "structureId", "latestRevisionId", "items"], "properties": { "state": { "const": "initialized", "type": "string" }, "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "position", "durationSeconds" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "media", "type": "string", "enum": ["media", "video", "audio", "label"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } } } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "MediaNotFound", "type": "string", "enum": ["MediaNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiUnitsMediaByUnitIdContent-structureNodes", "x-rezics-quota-route-operation-id": "getApiUnitsMediaByUnitIdContent-structureNodes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/units/media/{unitId}/content-structure": { "put": { "summary": "Save a complete Media Content Structure draft", "tags": ["Content Structure"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["base", "nodes"], "properties": { "base": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "uninitialized", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "revisionId"], "properties": { "kind": { "const": "revision", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" } } } ] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "nodes": { "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "id", "parentId", "order", "title"], "properties": { "state": { "const": "existing", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "state", "id", "parentId", "order", "title", "language", "contentKind" ], "properties": { "state": { "const": "new", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "contentKind": { "default": "video", "type": "string", "enum": ["video", "audio", "label"] } } }, { "additionalProperties": false, "type": "object", "required": ["state", "id", "parentId", "order", "contentUnitId"], "properties": { "state": { "const": "attached", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "contentUnitId": { "format": "uuid", "type": "string" } } } ] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "state", "structureId", "latestRevisionId", "revisionCreated", "items" ], "properties": { "state": { "const": "initialized", "type": "string" }, "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "position", "durationSeconds" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "media", "type": "string", "enum": ["media", "video", "audio", "label"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "durationSeconds": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiUnitsMediaByUnitIdContent-structure", "x-rezics-quota-route-operation-id": "putApiUnitsMediaByUnitIdContent-structure", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/books/{bookId}/content-nodes/{nodeId}": { "get": { "summary": "Read a Chapter occurrence in a Book", "tags": ["Books"], "parameters": [ { "name": "bookId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "language", "in": "query", "required": false, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "nodeId", "bookId", "chapterId", "title", "position", "language", "availableLanguages", "content", "contentMetrics", "status", "updatedAt", "previousNodeId", "nextNodeId", "capabilities" ], "properties": { "nodeId": { "format": "uuid", "type": "string" }, "bookId": { "format": "uuid", "type": "string" }, "chapterId": { "format": "uuid", "type": "string" }, "title": { "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "availableLanguages": { "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "content": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentMetrics": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["wordCount", "characterCount"], "properties": { "wordCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "characterCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "status": { "nullable": true, "anyOf": [ { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, { "type": "null" } ] }, "updatedAt": { "format": "date-time", "type": "string" }, "previousNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "nextNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "capabilities": { "type": "object", "required": ["canReply"], "properties": { "canReply": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ChapterNotFound", "type": "string", "enum": ["ChapterNotFound", "ChapterLanguageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiBooksByBookIdContent-nodesByNodeId", "x-rezics-quota-route-operation-id": "getApiBooksByBookIdContent-nodesByNodeId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/chapters/{chapterId}/localizations/{language}/content": { "put": { "summary": "Create or replace chapter content", "tags": ["Books"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "chapterId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "language", "in": "path", "required": true, "schema": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["title", "content", "status", "baseRevisionId"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "status": { "type": "string", "enum": ["draft", "published", "archived"] }, "baseRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated"], "properties": { "updated": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict", "PostTagMentionVoteConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiChaptersByChapterIdLocalizationsByLanguageContent", "x-rezics-quota-route-operation-id": "putApiChaptersByChapterIdLocalizationsByLanguageContent", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress": { "get": { "summary": "List current profile progress", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "unitId", "status", "progress", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "lastReadAnchor", "visibility", "type", "language", "title" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "type": "number" }, "completedCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalTimeMs": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiProgress", "x-rezics-quota-route-operation-id": "getApiProgress", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/search/filter": { "get": { "summary": "Get the Progress Filter definition", "tags": ["Progress", "Search"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "$id": "SearchFeatureDefinition", "type": "object", "required": ["filterDocument", "categories", "query", "sort", "controls"], "properties": { "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } }, "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "query": { "additionalProperties": false, "type": "object", "required": ["enabled"], "properties": { "enabled": { "type": "boolean" }, "required": { "type": "boolean" } } }, "sort": { "additionalProperties": false, "type": "object", "required": ["search", "feed"], "properties": { "search": { "additionalProperties": false, "$id": "SearchSortConfiguration", "type": "object", "required": ["defaults", "options"], "properties": { "defaults": { "additionalProperties": false, "type": "object", "required": ["emptyQuery", "textQuery"], "properties": { "emptyQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "textQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "options": { "minItems": 1, "maxItems": 18, "type": "array", "items": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } } }, "feed": { "additionalProperties": false, "$id": "SearchSortConfiguration", "type": "object", "required": ["defaults", "options"], "properties": { "defaults": { "additionalProperties": false, "type": "object", "required": ["emptyQuery", "textQuery"], "properties": { "emptyQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "textQuery": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "options": { "minItems": 1, "maxItems": 18, "type": "array", "items": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } } } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "ResolvedSearchControl", "type": "object", "required": [ "key", "field", "component", "operators", "enabled", "disclosure" ], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "component": { "type": "string", "enum": [ "select", "multi-select", "toggle", "date-range", "value-range", "realm-tag-vote" ] }, "operators": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "type": "string", "enum": [ "equals", "not-equals", "any-of", "all-of", "none-of", "range", "exists", "matches" ] } }, "optionSource": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "facet", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "options"], "properties": { "kind": { "const": "static", "type": "string" }, "options": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "required": { "default": false, "type": "boolean" }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] } } } } } } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiProgressSearchFilter", "x-rezics-quota-route-operation-id": "getApiProgressSearchFilter", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/search": { "post": { "summary": "Search current profile progress with a Search Feature state", "tags": ["Progress", "Search"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["injections", "state"], "properties": { "injections": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "SearchInjection", "type": "object", "required": ["source", "value", "removable"], "properties": { "source": { "type": "string", "enum": ["tag", "link"] }, "value": { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, "removable": { "default": true, "type": "boolean" } } } }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "total"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "unitId", "status", "progress", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "lastReadAnchor", "visibility", "type", "language", "title", "summary", "cover" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completedCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "totalTimeMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "type": { "default": "book", "type": "string", "enum": ["book", "media", "software"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiProgressSearch", "x-rezics-quota-route-operation-id": "postApiProgressSearch", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}": { "get": { "summary": "Get progress state", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "const": "untracked", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["state", "record", "continuation"], "properties": { "state": { "const": "tracked", "type": "string" }, "record": { "type": "object", "required": [ "profileId", "unitId", "status", "progress", "isDeleted", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "currentEntryId", "lastReadAnchor", "visibility", "createdAt", "updatedAt" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "type": "number" }, "isDeleted": { "type": "boolean" }, "completedCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalTimeMs": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "currentEntryId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } }, "continuation": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "bookId", "nodeId"], "properties": { "kind": { "const": "book-node", "type": "string" }, "bookId": { "format": "uuid", "type": "string" }, "nodeId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "contentUnit"], "properties": { "kind": { "const": "unit", "type": "string" }, "contentUnit": { "additionalProperties": false, "type": "object", "required": ["id", "type"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "video", "type": "string", "enum": ["video", "audio"] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "ownerUnit"], "properties": { "kind": { "const": "contents", "type": "string" }, "ownerUnit": { "additionalProperties": false, "type": "object", "required": ["id", "type"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "media"] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "none", "type": "string" } } } ] } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiProgressByUnitId", "x-rezics-quota-route-operation-id": "getApiProgressByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Create or replace progress", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["status"], "properties": { "status": { "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "totalTimeMs": { "minimum": 0, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 9007199254740991, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "profileId", "unitId", "status", "progress", "isDeleted", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "currentEntryId", "lastReadAnchor", "visibility", "createdAt", "updatedAt" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "type": "number" }, "isDeleted": { "type": "boolean" }, "completedCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalTimeMs": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "currentEntryId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNodeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiProgressByUnitId", "x-rezics-quota-route-operation-id": "putApiProgressByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete progress", "tags": ["Progress"], "responses": { "204": { "description": "No Content" }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiProgressByUnitId", "x-rezics-quota-route-operation-id": "deleteApiProgressByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/entries": { "get": { "summary": "List Progress journal entries", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 30, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 30, "type": "integer" } ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "profileId", "unitId", "entryKind", "status", "progress", "completionDelta", "totalTimeMs", "lastContentStructureNodeId", "contentStructureRevisionId", "occurredAt", "datePrecision", "reviewId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completionDelta": { "minimum": 0, "maximum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 1, "type": "integer" } ] }, "totalTimeMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentStructureRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "occurredAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] }, "reviewId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiProgressByUnitIdEntries", "x-rezics-quota-route-operation-id": "getApiProgressByUnitIdEntries", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create a Progress journal entry", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["entryKind", "status", "occurredAt", "datePrecision"], "properties": { "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "totalTimeMs": { "minimum": 0, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 9007199254740991, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "occurredAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "profileId", "unitId", "entryKind", "status", "progress", "completionDelta", "totalTimeMs", "lastContentStructureNodeId", "contentStructureRevisionId", "occurredAt", "datePrecision", "reviewId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completionDelta": { "minimum": 0, "maximum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 1, "type": "integer" } ] }, "totalTimeMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentStructureRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "occurredAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] }, "reviewId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNodeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiProgressByUnitIdEntries", "x-rezics-quota-route-operation-id": "postApiProgressByUnitIdEntries", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/entries/{entryId}": { "put": { "summary": "Replace a Progress journal entry", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "entryId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["entryKind", "status", "occurredAt", "datePrecision"], "properties": { "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "totalTimeMs": { "minimum": 0, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 9007199254740991, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "occurredAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "profileId", "unitId", "entryKind", "status", "progress", "completionDelta", "totalTimeMs", "lastContentStructureNodeId", "contentStructureRevisionId", "occurredAt", "datePrecision", "reviewId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completionDelta": { "minimum": 0, "maximum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 1, "type": "integer" } ] }, "totalTimeMs": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentStructureRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "occurredAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] }, "reviewId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": [ "UnitNotFound", "ProgressEntryNotFound", "ContentStructureNodeNotFound" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiProgressByUnitIdEntriesByEntryId", "x-rezics-quota-route-operation-id": "putApiProgressByUnitIdEntriesByEntryId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete a Progress journal entry", "tags": ["Progress"], "responses": { "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ProgressEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "entryId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiProgressByUnitIdEntriesByEntryId", "x-rezics-quota-route-operation-id": "deleteApiProgressByUnitIdEntriesByEntryId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/entries/{entryId}/current": { "put": { "summary": "Set a Progress journal entry as current", "tags": ["Progress"], "responses": { "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ProgressEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "entryId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "putApiProgressByUnitIdEntriesByEntryIdCurrent", "x-rezics-quota-route-operation-id": "putApiProgressByUnitIdEntriesByEntryIdCurrent", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/nodes": { "get": { "summary": "List completed Content Structure nodes", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["nodeId", "completedAt"], "properties": { "nodeId": { "format": "uuid", "type": "string" }, "completedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiProgressByUnitIdNodes", "x-rezics-quota-route-operation-id": "getApiProgressByUnitIdNodes", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/nodes/{nodeId}/read": { "post": { "summary": "Record a Book chapter read", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["completed", "journalEntryCreated", "record"], "properties": { "completed": { "const": true, "type": "boolean" }, "journalEntryCreated": { "type": "boolean" }, "record": { "type": "object", "required": [ "profileId", "unitId", "status", "progress", "isDeleted", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "currentEntryId", "lastReadAnchor", "visibility", "createdAt", "updatedAt" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "type": "number" }, "isDeleted": { "type": "boolean" }, "completedCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalTimeMs": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "currentEntryId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNodeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiProgressByUnitIdNodesByNodeIdRead", "x-rezics-quota-route-operation-id": "postApiProgressByUnitIdNodesByNodeIdRead", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/complete": { "post": { "summary": "Complete current progress", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "totalTimeMs": { "minimum": 0, "maximum": 9007199254740991, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 9007199254740991, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "profileId", "unitId", "status", "progress", "isDeleted", "completedCount", "totalTimeMs", "firstSeenAt", "lastSeenAt", "lastContentStructureNodeId", "currentEntryId", "lastReadAnchor", "visibility", "createdAt", "updatedAt" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "type": "number" }, "isDeleted": { "type": "boolean" }, "completedCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalTimeMs": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "firstSeenAt": { "format": "date-time", "type": "string" }, "lastSeenAt": { "format": "date-time", "type": "string" }, "lastContentStructureNodeId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "currentEntryId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "lastReadAnchor": { "nullable": true, "anyOf": [{}, { "type": "null" }] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiProgressByUnitIdComplete", "x-rezics-quota-route-operation-id": "postApiProgressByUnitIdComplete", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/progress/{unitId}/nodes/{nodeId}": { "put": { "summary": "Complete Content Structure node", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["completed"], "properties": { "completed": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNodeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiProgressByUnitIdNodesByNodeId", "x-rezics-quota-route-operation-id": "putApiProgressByUnitIdNodesByNodeId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Uncomplete Content Structure node", "tags": ["Progress"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "nodeId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["completed"], "properties": { "completed": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ContentStructureNodeNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiProgressByUnitIdNodesByNodeId", "x-rezics-quota-route-operation-id": "deleteApiProgressByUnitIdNodesByNodeId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections": { "get": { "summary": "List collections", "tags": ["Collections"], "parameters": [ { "name": "publisherProfileId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "editableOnly", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "targetId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "containsTargetId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "acceptsItemsOnly", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "search", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 200, "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 4096, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "purpose", "language", "itemCount", "containsTarget", "acceptsItems", "attributions", "latestRevisionId", "latestItemsRevisionId", "title", "summary", "cover", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "purpose": { "default": "collection", "type": "string", "enum": ["collection", "favorites"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "itemCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "containsTarget": { "type": "boolean" }, "acceptsItems": { "type": "boolean" }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "latestRevisionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollections", "x-rezics-quota-route-operation-id": "getApiCollections", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create collection", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["localization"], "properties": { "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "visibility", "language", "purpose", "itemCount", "attributions", "cover", "latestRevisionId", "latestItemsRevisionId", "createdAt", "updatedAt", "localizations", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "purpose": { "default": "collection", "type": "string", "enum": ["collection", "favorites"] }, "itemCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEditDetails", "canManageItems", "canManagePublishers", "canManageLocalizations", "canManageAccess", "canManageRealmPublications", "canViewHistory", "canRestoreHistory" ], "properties": { "canEditDetails": { "type": "boolean" }, "canManageItems": { "type": "boolean" }, "canManagePublishers": { "type": "boolean" }, "canManageLocalizations": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canViewHistory": { "type": "boolean" }, "canRestoreHistory": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiCollections", "x-rezics-quota-route-operation-id": "postApiCollections", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/favorites": { "get": { "summary": "Get Favorites collection", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "visibility", "language", "purpose", "itemCount", "attributions", "cover", "latestRevisionId", "latestItemsRevisionId", "createdAt", "updatedAt", "localizations", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "purpose": { "default": "collection", "type": "string", "enum": ["collection", "favorites"] }, "itemCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEditDetails", "canManageItems", "canManagePublishers", "canManageLocalizations", "canManageAccess", "canManageRealmPublications", "canViewHistory", "canRestoreHistory" ], "properties": { "canEditDetails": { "type": "boolean" }, "canManageItems": { "type": "boolean" }, "canManagePublishers": { "type": "boolean" }, "canManageLocalizations": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canViewHistory": { "type": "boolean" }, "canRestoreHistory": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollectionsFavorites", "x-rezics-quota-route-operation-id": "getApiCollectionsFavorites", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/items": { "get": { "summary": "List hydrated collection content", "tags": ["Collections"], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 4096, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["membership", "content"], "properties": { "membership": { "type": "object", "required": ["targetId", "position", "createdAt"], "properties": { "targetId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } } }, "content": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollectionsByCollectionIdItems", "x-rezics-quota-route-operation-id": "getApiCollectionsByCollectionIdItems", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}": { "get": { "summary": "Get collection", "tags": ["Collections"], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "visibility", "language", "purpose", "itemCount", "attributions", "cover", "latestRevisionId", "latestItemsRevisionId", "createdAt", "updatedAt", "localizations", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "purpose": { "default": "collection", "type": "string", "enum": ["collection", "favorites"] }, "itemCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEditDetails", "canManageItems", "canManagePublishers", "canManageLocalizations", "canManageAccess", "canManageRealmPublications", "canViewHistory", "canRestoreHistory" ], "properties": { "canEditDetails": { "type": "boolean" }, "canManageItems": { "type": "boolean" }, "canManagePublishers": { "type": "boolean" }, "canManageLocalizations": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canViewHistory": { "type": "boolean" }, "canRestoreHistory": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollectionsByCollectionId", "x-rezics-quota-route-operation-id": "getApiCollectionsByCollectionId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update collection", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "status": { "type": "string", "enum": ["draft", "published", "archived"] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "visibility", "language", "purpose", "itemCount", "attributions", "cover", "latestRevisionId", "latestItemsRevisionId", "createdAt", "updatedAt", "localizations", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "purpose": { "default": "collection", "type": "string", "enum": ["collection", "favorites"] }, "itemCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "latestRevisionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEditDetails", "canManageItems", "canManagePublishers", "canManageLocalizations", "canManageAccess", "canManageRealmPublications", "canViewHistory", "canRestoreHistory" ], "properties": { "canEditDetails": { "type": "boolean" }, "canManageItems": { "type": "boolean" }, "canManagePublishers": { "type": "boolean" }, "canManageLocalizations": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canViewHistory": { "type": "boolean" }, "canRestoreHistory": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiCollectionsByCollectionId", "x-rezics-quota-route-operation-id": "patchApiCollectionsByCollectionId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/items/batch-update": { "post": { "summary": "Apply an atomic mixed Collection item command batch", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId", "changes"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" }, "changes": { "minItems": 1, "maxItems": 10000, "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["opId", "type", "targetId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "item.add", "type": "string" }, "targetId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "targetId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "item.remove", "type": "string" }, "targetId": { "format": "uuid", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "targetIds", "placement"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "items.move", "type": "string" }, "targetIds": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "placement": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "default": "start", "type": "string", "enum": ["start", "end"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "targetId"], "properties": { "kind": { "default": "before", "type": "string", "enum": ["before", "after"] }, "targetId": { "format": "uuid", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["opId", "type", "leftTargetId", "rightTargetId"], "properties": { "opId": { "minLength": 1, "maxLength": 100, "type": "string" }, "type": { "const": "items.swap", "type": "string" }, "leftTargetId": { "format": "uuid", "type": "string" }, "rightTargetId": { "format": "uuid", "type": "string" } } } ] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["results", "latestItemsRevisionId", "revisionCreated"], "properties": { "results": { "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["opId", "applied"], "properties": { "opId": { "type": "string" }, "applied": { "const": true, "type": "boolean" }, "itemState": { "default": "created", "type": "string", "enum": ["created", "existing"] } } } }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiCollectionsByCollectionIdItemsBatch-update", "x-rezics-quota-route-operation-id": "postApiCollectionsByCollectionIdItemsBatch-update", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/items/batch": { "post": { "summary": "Add collection items atomically", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId", "items"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" }, "items": { "minItems": 1, "maxItems": 10000, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["targetId"], "properties": { "targetId": { "format": "uuid", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "latestItemsRevisionId"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["targetId", "state"], "properties": { "targetId": { "format": "uuid", "type": "string" }, "state": { "default": "created", "type": "string", "enum": ["created", "existing"] } } } }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiCollectionsByCollectionIdItemsBatch", "x-rezics-quota-route-operation-id": "postApiCollectionsByCollectionIdItemsBatch", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/items/move": { "post": { "summary": "Move collection items atomically", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId", "targetIds", "placement"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" }, "targetIds": { "minItems": 1, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "placement": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "default": "start", "type": "string", "enum": ["start", "end"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "targetId"], "properties": { "kind": { "const": "after", "type": "string" }, "targetId": { "format": "uuid", "type": "string" } } } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["saved", "latestItemsRevisionId"], "properties": { "saved": { "type": "boolean" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiCollectionsByCollectionIdItemsMove", "x-rezics-quota-route-operation-id": "postApiCollectionsByCollectionIdItemsMove", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/items/{targetId}": { "put": { "summary": "Save collection item", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["saved", "latestItemsRevisionId"], "properties": { "saved": { "type": "boolean" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiCollectionsByCollectionIdItemsByTargetId", "x-rezics-quota-route-operation-id": "putApiCollectionsByCollectionIdItemsByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove collection item", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["saved", "latestItemsRevisionId"], "properties": { "saved": { "type": "boolean" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiCollectionsByCollectionIdItemsByTargetId", "x-rezics-quota-route-operation-id": "deleteApiCollectionsByCollectionIdItemsByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/item-revisions": { "get": { "summary": "List Collection item revisions", "tags": ["Collections"], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentRevisionId", "sourceRevisionId", "actorProfileId", "kind", "editSummary", "minor", "replayByteSize", "checkpointByteSize", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "sourceRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "actorProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "kind": { "default": "create", "type": "string", "enum": ["create", "update", "restore"] }, "editSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "minor": { "type": "boolean" }, "replayByteSize": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "checkpointByteSize": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollectionsByCollectionIdItem-revisions", "x-rezics-quota-route-operation-id": "getApiCollectionsByCollectionIdItem-revisions", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/item-revisions/compare": { "get": { "summary": "Compare Collection item revisions", "tags": ["Collections"], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "from", "in": "query", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "to", "in": "query", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["fromRevisionId", "toRevisionId", "changes"], "properties": { "fromRevisionId": { "format": "uuid", "type": "string" }, "toRevisionId": { "format": "uuid", "type": "string" }, "changes": { "type": "array", "items": { "type": "object", "required": ["path"], "properties": { "path": { "type": "string" }, "before": {}, "after": {} } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiCollectionsByCollectionIdItem-revisionsCompare", "x-rezics-quota-route-operation-id": "getApiCollectionsByCollectionIdItem-revisionsCompare", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/{collectionId}/item-revisions/{revisionId}/restore": { "post": { "summary": "Restore a Collection item revision", "tags": ["Collections"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "collectionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" }, "message": { "maxLength": 500, "type": "string" }, "minor": { "default": false, "type": "boolean" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["updated", "latestItemsRevisionId", "revisionCreated"], "properties": { "updated": { "const": true, "type": "boolean" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden", "UnitAccessRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionNotFound", "type": "string", "enum": ["CollectionNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "FavoritesEditForbidden", "type": "string", "enum": ["FavoritesEditForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } ] } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiCollectionsByCollectionIdItem-revisionsByRevisionIdRestore", "x-rezics-quota-route-operation-id": "postApiCollectionsByCollectionIdItem-revisionsByRevisionIdRestore", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/collections/favorites/items/{targetId}": { "put": { "summary": "Favorite unit", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["favorited", "collectionId", "latestItemsRevisionId"], "properties": { "favorited": { "type": "boolean" }, "collectionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiCollectionsFavoritesItemsByTargetId", "x-rezics-quota-route-operation-id": "putApiCollectionsFavoritesItemsByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove favorite unit", "tags": ["Collections"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseItemsRevisionId"], "properties": { "baseItemsRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["favorited", "collectionId", "latestItemsRevisionId"], "properties": { "favorited": { "type": "boolean" }, "collectionId": { "format": "uuid", "type": "string" }, "latestItemsRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "CollectionStructureRevisionConflict", "type": "string", "enum": ["CollectionStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiCollectionsFavoritesItemsByTargetId", "x-rezics-quota-route-operation-id": "deleteApiCollectionsFavoritesItemsByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reviews": { "get": { "summary": "List reviews", "tags": ["Reviews"], "parameters": [ { "name": "targetId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmIds", "in": "query", "required": false, "schema": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } } }, { "name": "languages", "in": "query", "required": false, "schema": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "sort", "in": "query", "required": false, "schema": { "default": "best", "type": "string", "enum": ["best", "new"] } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } }, { "name": "scoreRealmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "scores", "in": "query", "required": false, "schema": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["totalCount", "nextCursor", "items"], "properties": { "totalCount": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores", "targetId" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["rootPostId", "title", "attributions", "subjectId"], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "targetId": { "format": "uuid", "type": "string" } } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReviews", "x-rezics-quota-route-operation-id": "getApiReviews", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create review", "tags": ["Reviews"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["targetId", "publishRealmIds", "language", "body"], "properties": { "targetId": { "format": "uuid", "type": "string" }, "progressEntryId": { "format": "uuid", "type": "string" }, "publishRealmIds": { "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "score": { "additionalProperties": false, "type": "object", "required": ["realmId", "value"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "minLength": 1, "maxLength": 2000, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired", "PostTargetingLocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiReviews", "x-rezics-quota-route-operation-id": "postApiReviews", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reviews/{reviewId}": { "get": { "summary": "Get review", "tags": ["Reviews"], "parameters": [ { "name": "reviewId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "availableLanguages", "postKind", "attributions", "targetId", "realmId", "title", "summary", "language", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "progressEntry", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "postKind": { "const": "review", "type": "string" }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "targetId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "progressEntry": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "unitId", "entryKind", "status", "progress", "completionDelta", "occurredAt", "datePrecision" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completionDelta": { "minimum": 0, "maximum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 1, "type": "integer" } ] }, "occurredAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canManageScores", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageScores": { "type": "boolean" }, "canReply": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ReviewNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReviewsByReviewId", "x-rezics-quota-route-operation-id": "getApiReviewsByReviewId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update review", "tags": ["Reviews"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "reviewId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["language", "title", "summary", "body"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 2000, "type": "string" }, { "type": "null" } ] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PostTagMentionVoteConflict", "type": "string", "enum": ["PostTagMentionVoteConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiReviewsByReviewId", "x-rezics-quota-route-operation-id": "patchApiReviewsByReviewId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/scores/{targetId}": { "put": { "summary": "Score unit", "tags": ["Reviews"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "score"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "score": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["scoreId", "score", "visibility"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiScoresByTargetId", "x-rezics-quota-route-operation-id": "putApiScoresByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "get": { "summary": "Get score aggregate", "tags": ["Reviews"], "parameters": [ { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "query", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["totalScore", "totalCount", "distribution"], "properties": { "totalScore": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "totalCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "distribution": { "type": "object", "patternProperties": { "^(.*)$": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiScoresByTargetId", "x-rezics-quota-route-operation-id": "getApiScoresByTargetId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/scores/{targetId}/viewer": { "get": { "summary": "List current user's Scores for a Unit", "tags": ["Reviews"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "targetId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "realmId", "value", "visibility", "realmTitle", "updatedAt" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiScoresByTargetIdViewer", "x-rezics-quota-route-operation-id": "getApiScoresByTargetIdViewer", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reactions/units/{unitId}": { "get": { "summary": "Get Unit reaction summary", "tags": ["Reactions"], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "viewerReaction"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["reaction", "count"], "properties": { "reaction": { "type": "string" }, "count": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiReactionsUnitsByUnitId", "x-rezics-quota-route-operation-id": "getApiReactionsUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Set Unit reaction", "tags": ["Reactions"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["reaction"], "properties": { "reaction": { "type": "string", "enum": ["upvote", "downvote"] }, "realmId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["reaction"], "properties": { "reaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiReactionsUnitsByUnitId", "x-rezics-quota-route-operation-id": "putApiReactionsUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit reaction", "tags": ["Reactions"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["reaction"], "properties": { "reaction": { "type": "string", "enum": ["upvote", "downvote"] }, "realmId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["reaction"], "properties": { "reaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiReactionsUnitsByUnitId", "x-rezics-quota-route-operation-id": "deleteApiReactionsUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/reactions/shares/{unitId}": { "put": { "summary": "Record Unit share", "tags": ["Reactions"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["shared"], "properties": { "shared": { "type": "boolean" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiReactionsSharesByUnitId", "x-rezics-quota-route-operation-id": "putApiReactionsSharesByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Unit share", "tags": ["Reactions"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["shared"], "properties": { "shared": { "type": "boolean" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiReactionsSharesByUnitId", "x-rezics-quota-route-operation-id": "deleteApiReactionsSharesByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/polls": { "post": { "summary": "Create poll", "tags": ["Polls"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["question", "language", "options", "voteMode", "resultsVisibility"], "properties": { "question": { "minLength": 1, "maxLength": 500, "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "options": { "minItems": 2, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["sourceKind", "label"], "properties": { "sourceKind": { "const": "literal", "type": "string" }, "label": { "minLength": 1, "maxLength": 500, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["sourceKind", "targetUnitId", "label"], "properties": { "sourceKind": { "const": "unit", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "label": { "minLength": 1, "maxLength": 500, "type": "string" } } } ] } }, "voteMode": { "type": "string", "enum": ["single", "multiple"] }, "anonymous": { "default": false, "type": "boolean" }, "resultsVisibility": { "type": "string", "enum": ["live", "after_close"] }, "closesAt": { "format": "date-time", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PollOptionsDuplicated", "type": "string", "enum": [ "PollOptionsDuplicated", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiPolls", "x-rezics-quota-route-operation-id": "postApiPolls", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/polls/{pollId}": { "get": { "summary": "Get poll", "tags": ["Polls"], "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "language", "question", "voteMode", "anonymous", "resultsVisibility", "closesAt", "createdAt", "closed", "viewerOptionIds", "options" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "question": { "type": "string" }, "voteMode": { "type": "string" }, "anonymous": { "type": "boolean" }, "resultsVisibility": { "type": "string" }, "closesAt": { "nullable": true, "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "closed": { "type": "boolean" }, "viewerOptionIds": { "type": "array", "items": { "format": "uuid", "type": "string" } }, "options": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "sourceKind", "targetUnitId", "label", "position", "voteCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceKind": { "const": "literal", "type": "string" }, "targetUnitId": { "type": "null" }, "label": { "type": "string" }, "position": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "voteCount": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] } } }, { "type": "object", "required": [ "id", "sourceKind", "targetUnitId", "label", "position", "voteCount" ], "properties": { "id": { "format": "uuid", "type": "string" }, "sourceKind": { "const": "unit", "type": "string" }, "targetUnitId": { "format": "uuid", "type": "string" }, "label": { "type": "string" }, "position": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "voteCount": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] } } } ] } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PollNotFound", "type": "string", "enum": ["PollNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPollsByPollId", "x-rezics-quota-route-operation-id": "getApiPollsByPollId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/polls/{pollId}/vote": { "put": { "summary": "Replace poll vote", "tags": ["Polls"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["optionIds"], "properties": { "optionIds": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "format": "uuid", "type": "string" } }, "realmId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["optionIds"], "properties": { "optionIds": { "type": "array", "items": { "format": "uuid", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PollSingleChoiceInvalid", "type": "string", "enum": ["PollSingleChoiceInvalid", "PollOptionInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PollClosed"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PollNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiPollsByPollIdVote", "x-rezics-quota-route-operation-id": "putApiPollsByPollIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Withdraw poll vote", "tags": ["Polls"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["optionIds"], "properties": { "optionIds": { "type": "array", "items": { "format": "uuid", "type": "string" } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PollClosed", "type": "string", "enum": ["PollClosed"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PollNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiPollsByPollIdVote", "x-rezics-quota-route-operation-id": "deleteApiPollsByPollIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/polls/{pollId}/close": { "post": { "summary": "Close poll", "tags": ["Polls"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "pollId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PollAlreadyClosed", "type": "string", "enum": ["PollAlreadyClosed"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiPollsByPollIdClose", "x-rezics-quota-route-operation-id": "postApiPollsByPollIdClose", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts/{postId}/scores": { "get": { "summary": "List Post Scores", "tags": ["Posts"], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "profileId", "unitId", "realmId", "realmTitle", "value", "visibility", "position", "updatedAt" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PostNotFound", "type": "string", "enum": ["PostNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPostsByPostIdScores", "x-rezics-quota-route-operation-id": "getApiPostsByPostIdScores", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace Post Scores", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "maxItems": 5, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["scoreId"], "properties": { "scoreId": { "format": "uuid", "type": "string" } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "profileId", "unitId", "realmId", "realmTitle", "value", "visibility", "position", "updatedAt" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound", "PostScoreNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PostScoreDuplicate", "type": "string", "enum": ["PostScoreDuplicate"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiPostsByPostIdScores", "x-rezics-quota-route-operation-id": "putApiPostsByPostIdScores", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts": { "get": { "summary": "List posts", "tags": ["Posts"], "parameters": [ { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "subjectId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "postKind", "language", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "title", "summary", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "postKind": { "type": "string", "enum": ["post", "reply"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "type": "string", "enum": [0, 1, 2] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPosts", "x-rezics-quota-route-operation-id": "getApiPosts", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create post or excerpt", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["body", "language", "publishRealmIds", "postKind"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "minLength": 1, "maxLength": 2000, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "publishRealmIds": { "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "contentSpoilerLevel": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "contentNsfw": { "type": "boolean" }, "postKind": { "const": "post", "type": "string" }, "subjectId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["body", "language", "publishRealmIds", "postKind", "subjectId"], "properties": { "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "minLength": 1, "maxLength": 2000, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "publishRealmIds": { "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "contentSpoilerLevel": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "contentNsfw": { "type": "boolean" }, "postKind": { "const": "excerpt", "type": "string" }, "subjectId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired", "PostTargetingLocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiPosts", "x-rezics-quota-route-operation-id": "postApiPosts", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts/wiki": { "post": { "summary": "Create Wiki", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["accessMode", "title", "body", "language", "publishRealmIds"], "properties": { "accessMode": { "type": "string", "enum": ["community_owned", "restricted"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "publishRealmIds": { "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "subjectId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired", "PostTargetingLocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiPostsWiki", "x-rezics-quota-route-operation-id": "postApiPostsWiki", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts/{postId}": { "get": { "summary": "Get post", "tags": ["Posts"], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "required": [ "id", "availableLanguages", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "replyCount", "language", "title", "summary", "body", "contentSpoiler", "contentNsfw", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "capabilities", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canReply": { "type": "boolean" } } }, "postKind": { "const": "post", "type": "string" } } }, { "type": "object", "required": [ "id", "availableLanguages", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "replyCount", "language", "title", "summary", "body", "contentSpoiler", "contentNsfw", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "capabilities", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canReply": { "type": "boolean" } } }, "postKind": { "const": "reply", "type": "string" } } }, { "type": "object", "required": [ "id", "availableLanguages", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "replyCount", "language", "title", "summary", "body", "contentSpoiler", "contentNsfw", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "capabilities", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canReply": { "type": "boolean" } } }, "postKind": { "const": "excerpt", "type": "string" } } }, { "type": "object", "required": [ "id", "availableLanguages", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "replyCount", "language", "title", "summary", "body", "contentSpoiler", "contentNsfw", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "capabilities", "postKind", "status" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canReply": { "type": "boolean" } } }, "postKind": { "const": "chapter", "type": "string" }, "status": { "nullable": true, "anyOf": [ { "default": "draft", "type": "string", "enum": ["draft", "published", "archived"] }, { "type": "null" } ] } } }, { "type": "object", "required": [ "id", "availableLanguages", "postKind", "attributions", "targetId", "realmId", "title", "summary", "language", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "progressEntry", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "postKind": { "const": "review", "type": "string" }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "targetId": { "format": "uuid", "type": "string" }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "progressEntry": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "unitId", "entryKind", "status", "progress", "completionDelta", "occurredAt", "datePrecision" ], "properties": { "unitId": { "format": "uuid", "type": "string" }, "entryKind": { "default": "update", "type": "string", "enum": ["update", "completion"] }, "status": { "default": "backlog", "type": "string", "enum": ["backlog", "active", "paused", "completed", "dropped"] }, "progress": { "minimum": 0, "maximum": 1, "type": "number" }, "completionDelta": { "minimum": 0, "maximum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 1, "type": "integer" } ] }, "occurredAt": { "nullable": true, "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ] }, "datePrecision": { "default": "instant", "type": "string", "enum": ["instant", "day", "month", "year", "unknown"] } } }, { "type": "null" } ] }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canManageScores", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canManageScores": { "type": "boolean" }, "canReply": { "type": "boolean" } } } } }, { "type": "object", "required": [ "id", "availableLanguages", "attributions", "realmId", "subjectId", "rootPostId", "parentPostId", "replyCount", "language", "title", "summary", "body", "contentSpoiler", "contentNsfw", "latestRevisionId", "createdAt", "updatedAt", "subject", "scores", "capabilities", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "subjectId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rootPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "type", "language", "title", "summary", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } }, { "type": "null" } ] }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } }, "capabilities": { "type": "object", "required": [ "canEdit", "canManageAttributions", "canManageRealmPublications", "canManageAccess", "canReply" ], "properties": { "canEdit": { "type": "boolean" }, "canManageAttributions": { "type": "boolean" }, "canManageRealmPublications": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canReply": { "type": "boolean" } } }, "postKind": { "const": "wiki", "type": "string" } } } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound", "PostLocalizationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPostsByPostId", "x-rezics-quota-route-operation-id": "getApiPostsByPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update post", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["language", "title", "summary", "body", "baseRevisionId"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "minLength": 1, "maxLength": 2000, "type": "string" }, { "type": "null" } ] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "baseRevisionId": { "format": "uuid", "type": "string" }, "editSummary": { "maxLength": 500, "type": "string" }, "minor": { "type": "boolean" }, "contentSpoilerLevel": { "type": "string", "enum": [0, 1, 2] }, "contentNsfw": { "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound", "PostLocalizationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict", "PostTagMentionVoteConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiPostsByPostId", "x-rezics-quota-route-operation-id": "patchApiPostsByPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts/{postId}/replies": { "get": { "summary": "List a bounded reply-post tree", "tags": ["Posts"], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "realmId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "parentPostId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "maxLength": 512, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 25, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 25, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "postKind", "language", "availableLanguages", "attributions", "rootPostId", "parentPostId", "depth", "body", "status", "latestRevisionId", "hasMoreChildren", "childEndCursor", "createdAt", "updatedAt", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "postKind": { "const": "reply", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "rootPostId": { "format": "uuid", "type": "string" }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "depth": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "status": { "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hasMoreChildren": { "type": "boolean" }, "childEndCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "capabilities": { "type": "object", "required": ["canEdit", "canReply"], "properties": { "canEdit": { "type": "boolean" }, "canReply": { "type": "boolean" } } } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiPostsByPostIdReplies", "x-rezics-quota-route-operation-id": "getApiPostsByPostIdReplies", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create reply post", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["language", "body"], "properties": { "parentPostId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "postKind", "language", "availableLanguages", "attributions", "rootPostId", "parentPostId", "depth", "body", "status", "latestRevisionId", "hasMoreChildren", "childEndCursor", "createdAt", "updatedAt", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "postKind": { "const": "reply", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "rootPostId": { "format": "uuid", "type": "string" }, "parentPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "depth": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "status": { "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "hasMoreChildren": { "type": "boolean" }, "childEndCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "capabilities": { "type": "object", "required": ["canEdit", "canReply"], "properties": { "canEdit": { "type": "boolean" }, "canReply": { "type": "boolean" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "ReplyDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound", "ParentReplyNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired", "PostTargetingLocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiPostsByPostIdReplies", "x-rezics-quota-route-operation-id": "postApiPostsByPostIdReplies", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/posts/{postId}/replies/{replyPostId}": { "patch": { "summary": "Update reply post", "tags": ["Posts"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "postId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "replyPostId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["language", "body", "baseRevisionId"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "baseRevisionId": { "format": "uuid", "type": "string" }, "editSummary": { "maxLength": 500, "type": "string" }, "minor": { "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitPermissionForbidden", "type": "string", "enum": ["UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ReplyPostNotFound", "type": "string", "enum": ["ReplyPostNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict", "PostTagMentionVoteConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiPostsByPostIdRepliesByReplyPostId", "x-rezics-quota-route-operation-id": "patchApiPostsByPostIdRepliesByReplyPostId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms": { "get": { "summary": "List Realms", "tags": ["Realms"], "parameters": [ { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "joinPolicy", "memberCount", "language", "title", "summary", "avatar", "banner", "cover", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "joinPolicy": { "type": "string" }, "memberCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealms", "x-rezics-quota-route-operation-id": "getApiRealms", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Realm", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["localization", "visibility", "joinPolicy"], "properties": { "initialTagIds": { "maxItems": 32, "uniqueItems": true, "default": [], "type": "array", "items": { "format": "uuid", "type": "string" } }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "joinPolicy": { "type": "string", "enum": ["open", "approval"] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound", "TagNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealms", "x-rezics-quota-route-operation-id": "postApiRealms", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/slug-address": { "put": { "operationId": "replaceRealmSlugAddress", "summary": "Replace a Realm slug address", "description": "Development preview. Assigns or renames a Realm's optional public slug in the permanent realms namespace. The former address is retained as a redirect.", "tags": ["Realms", "Slug Addresses"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["slug"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "addressId", "unitId", "scopeUnitId", "slug", "redirectAddressId", "canonicalPath" ], "properties": { "addressId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "scopeUnitId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "redirectAddressId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "canonicalPath": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSlug", "type": "string", "enum": ["InvalidSlug"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugTaken", "type": "string", "enum": ["SlugTaken", "SlugScopeUnavailable", "SlugScopeCycle"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SlugDepthExceeded", "type": "string", "enum": ["SlugDepthExceeded"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdSlug-address", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}": { "get": { "summary": "Get Realm", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "slugAddress", "status", "visibility", "language", "joinPolicy", "realmTagVotingEnabled", "pages", "latestRevisionId", "memberCount", "createdAt", "updatedAt", "avatar", "banner", "cover", "localizations", "viewerFollowing", "capabilities" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "status": { "type": "string" }, "visibility": { "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "joinPolicy": { "type": "string" }, "realmTagVotingEnabled": { "type": "boolean" }, "pages": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "main", "type": "string", "enum": ["main", "tags", "wiki"] } }, "latestRevisionId": { "format": "uuid", "type": "string" }, "memberCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "localizations": { "type": "array", "items": { "type": "object", "required": ["language", "title", "summary", "avatar", "banner", "cover"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } }, "viewerFollowing": { "type": "boolean" }, "viewerMembership": { "type": "object", "required": ["isOwner", "state"], "properties": { "isOwner": { "type": "boolean" }, "state": { "type": "string" } } }, "capabilities": { "type": "object", "required": [ "canCreateUnits", "canCreateReplies", "canUpdateSettings", "canReadMembers", "canManageMembers", "canUpdateRules", "canManagePins", "canManageTags", "canUpdateTagVoting", "canManageTagContexts", "canModerateUnits", "canManageAccess", "canRestoreHistory" ], "properties": { "canCreateUnits": { "type": "boolean" }, "canCreateReplies": { "type": "boolean" }, "canUpdateSettings": { "type": "boolean" }, "canReadMembers": { "type": "boolean" }, "canManageMembers": { "type": "boolean" }, "canUpdateRules": { "type": "boolean" }, "canManagePins": { "type": "boolean" }, "canManageTags": { "type": "boolean" }, "canUpdateTagVoting": { "type": "boolean" }, "canManageTagContexts": { "type": "boolean" }, "canModerateUnits": { "type": "boolean" }, "canManageAccess": { "type": "boolean" }, "canRestoreHistory": { "type": "boolean" } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmId", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Update Realm", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "joinPolicy": { "type": "string", "enum": ["open", "approval"] }, "visibility": { "type": "string", "enum": ["public", "unlisted", "private"] }, "status": { "type": "string", "enum": ["draft", "published", "archived"] }, "localization": { "additionalProperties": false, "type": "object", "required": ["language", "title"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "maxLength": 2000, "type": "string" }, "description": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["assetId"], "properties": { "assetId": { "format": "uuid", "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "format": "single-emoji-grapheme", "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "bannerAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "coverAssetId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound", "ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiRealmsByRealmId", "x-rezics-quota-route-operation-id": "patchApiRealmsByRealmId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/pages": { "put": { "summary": "Replace enabled Realm pages", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["pages", "baseRevisionId"], "properties": { "pages": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "contains": { "const": "main", "type": "string" }, "minContains": 1, "maxContains": 1, "type": "array", "items": { "default": "main", "type": "string", "enum": ["main", "tags", "wiki"] } }, "baseRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["pages", "latestRevisionId"], "properties": { "pages": { "minItems": 1, "maxItems": 3, "uniqueItems": true, "type": "array", "items": { "default": "main", "type": "string", "enum": ["main", "tags", "wiki"] } }, "latestRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdPages", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdPages", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/taxonomy": { "get": { "summary": "Get Realm taxonomy", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["structureId", "latestRevisionId", "items"], "properties": { "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "summary", "avatar", "position", "queryStrategy", "contextPostId", "contextSummary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "label", "type": "string", "enum": ["label", "tag", "wiki"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "queryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contextSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdTaxonomy", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdTaxonomy", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/taxonomy/draft": { "get": { "summary": "Get complete Realm taxonomy draft", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["structureId", "latestRevisionId", "items"], "properties": { "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "summary", "avatar", "position", "queryStrategy", "contextPostId", "contextSummary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "label", "type": "string", "enum": ["label", "tag", "wiki"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "queryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contextSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdTaxonomyDraft", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdTaxonomyDraft", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Save complete Realm taxonomy draft", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId", "nodes"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "nodes": { "type": "array", "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["state", "id", "parentId", "order", "queryStrategy"], "properties": { "state": { "const": "existing", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "queryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] } } }, { "additionalProperties": false, "type": "object", "required": [ "state", "id", "parentId", "order", "queryStrategy", "content" ], "properties": { "state": { "const": "new", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "queryStrategy": { "type": "null" }, "content": { "additionalProperties": false, "type": "object", "required": ["kind", "language", "title"], "properties": { "kind": { "const": "label", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "state", "id", "parentId", "order", "queryStrategy", "content" ], "properties": { "state": { "const": "new", "type": "string" }, "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "order": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "queryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "content": { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } } } } ] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["structureId", "latestRevisionId", "items", "revisionCreated"], "properties": { "structureId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "items": { "type": "array", "items": { "type": "object", "required": [ "id", "parentId", "contentUnitId", "contentKind", "language", "title", "summary", "avatar", "position", "queryStrategy", "contextPostId", "contextSummary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "parentId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contentUnitId": { "format": "uuid", "type": "string" }, "contentKind": { "default": "label", "type": "string", "enum": ["label", "tag", "wiki"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "queryStrategy": { "nullable": true, "anyOf": [ { "default": "global_effective", "type": "string", "enum": ["global_effective", "realm_community", "realm_policy"] }, { "type": "null" } ] }, "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "contextSummary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "revisionCreated": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureInvalid", "type": "string", "enum": ["ContentStructureInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTaxonomyDraft", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTaxonomyDraft", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/score-context": { "get": { "summary": "Get Realm Score context", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["contextPostId"], "properties": { "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound", "PostNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdScore-context", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdScore-context", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Set Realm Score context", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["contextPostId"], "properties": { "contextPostId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["contextPostId"], "properties": { "contextPostId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PostNotFound", "type": "string", "enum": ["PostNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmScoreContextPostKindInvalid", "type": "string", "enum": [ "RealmScoreContextPostKindInvalid", "RealmScoreContextPostNotMounted" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdScore-context", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdScore-context", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Clear Realm Score context", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiRealmsByRealmIdScore-context", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdScore-context", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-voting": { "put": { "summary": "Update Realm Tag voting policy", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["enabled"], "properties": { "enabled": { "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["enabled"], "properties": { "enabled": { "type": "boolean" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTag-voting", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTag-voting", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/membership": { "put": { "summary": "Join Realm", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["state"], "properties": { "state": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdMembership", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdMembership", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Leave Realm", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmMembershipNotFound", "type": "string", "enum": ["RealmMembershipNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmOwnerLeaveForbidden", "type": "string", "enum": ["RealmOwnerLeaveForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiRealmsByRealmIdMembership", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdMembership", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/members": { "get": { "summary": "List Realm members", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "profileId", "in": "query", "required": false, "schema": { "format": "uuid", "type": "string" } }, { "name": "state", "in": "query", "required": false, "schema": { "type": "string", "enum": ["active", "pending", "muted", "removed", "banned"] } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "profileId", "language", "name", "slugAddress", "avatar", "isOwner", "state", "joinedAt" ], "properties": { "profileId": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "isOwner": { "type": "boolean" }, "state": { "default": "active", "type": "string", "enum": ["active", "pending", "muted", "removed", "banned"] }, "joinedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdMembers", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdMembers", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/members/{profileId}": { "patch": { "summary": "Update Realm member", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "profileId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["state"], "properties": { "state": { "type": "string", "enum": ["active", "pending", "muted", "removed", "banned"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "profileId", "isOwner", "state", "joinedAt", "updatedAt"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "profileId": { "format": "uuid", "type": "string" }, "isOwner": { "type": "boolean" }, "state": { "default": "active", "type": "string", "enum": ["active", "pending", "muted", "removed", "banned"] }, "joinedAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmMemberNotFound", "type": "string", "enum": ["RealmMemberNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmOwnerLeaveForbidden", "type": "string", "enum": ["RealmOwnerLeaveForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiRealmsByRealmIdMembersByProfileId", "x-rezics-quota-route-operation-id": "patchApiRealmsByRealmIdMembersByProfileId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/rules": { "put": { "summary": "Update Realm rules", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": [ "baseRevisionId", "acknowledgementMode", "requireOnJoin", "requireOnPost", "rules" ], "properties": { "baseRevisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "acknowledgementMode": { "default": "explicit", "type": "string", "enum": ["explicit", "implicit_on_follow"] }, "requireOnJoin": { "type": "boolean" }, "requireOnPost": { "type": "boolean" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "rules": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["localizations"], "properties": { "localizations": { "minItems": 1, "maxItems": 7, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["language", "title", "content"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "version"], "properties": { "id": { "format": "uuid", "type": "string" }, "version": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRuleRevisionChanged", "type": "string", "enum": ["RealmRuleRevisionChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdRules", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdRules", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "get": { "summary": "Get current Realm rules", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "revisionId", "version", "acknowledgementMode", "requireOnJoin", "requireOnPost", "items" ], "properties": { "revisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "version": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] }, "acknowledgementMode": { "default": "explicit", "type": "string", "enum": ["explicit", "implicit_on_follow"] }, "requireOnJoin": { "type": "boolean" }, "requireOnPost": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "required": ["id", "position", "language", "title", "content"], "properties": { "id": { "format": "uuid", "type": "string" }, "position": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdRules", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdRules", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/rules/authoring": { "get": { "summary": "Get Realm rules for authoring", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "revisionId", "version", "acknowledgementMode", "requireOnJoin", "requireOnPost", "items" ], "properties": { "revisionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "version": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] }, "acknowledgementMode": { "default": "explicit", "type": "string", "enum": ["explicit", "implicit_on_follow"] }, "requireOnJoin": { "type": "boolean" }, "requireOnPost": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "required": ["id", "position", "localizations"], "properties": { "id": { "format": "uuid", "type": "string" }, "position": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "localizations": { "minItems": 1, "maxItems": 7, "type": "array", "items": { "type": "object", "required": ["language", "title", "content"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "type": "string" }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdRulesAuthoring", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdRulesAuthoring", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/rules/{revisionId}/acknowledgement": { "put": { "summary": "Acknowledge current Realm rules", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRuleRevisionChanged", "type": "string", "enum": ["RealmRuleRevisionChanged"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "revisionId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["language"], "properties": { "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } }, "required": true }, "operationId": "putApiRealmsByRealmIdRulesByRevisionIdAcknowledgement", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdRulesByRevisionIdAcknowledgement", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/pins": { "get": { "summary": "List Realm pins", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "contentItems"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "realmId", "unitId", "kind", "position", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "kind": { "default": "pinned", "type": "string", "enum": ["pinned", "highlight"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "contentItems": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdPins", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdPins", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/pins/move": { "post": { "summary": "Move Realm pins", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["unitIds", "destinationKind", "placement"], "properties": { "unitIds": { "minItems": 1, "maxItems": 100, "uniqueItems": true, "type": "array", "items": { "format": "uuid", "type": "string" } }, "destinationKind": { "default": "pinned", "type": "string", "enum": ["pinned", "highlight"] }, "placement": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "default": "start", "type": "string", "enum": ["start", "end"] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId"], "properties": { "kind": { "const": "after", "type": "string" }, "unitId": { "format": "uuid", "type": "string" } } } ] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["saved", "latestRevisionId"], "properties": { "saved": { "type": "boolean" }, "latestRevisionId": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealmsByRealmIdPinsMove", "x-rezics-quota-route-operation-id": "postApiRealmsByRealmIdPinsMove", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/pins/{unitId}": { "put": { "summary": "Pin Realm unit", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "kind": { "default": "pinned", "type": "string", "enum": ["pinned", "highlight"] }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "kind", "position", "createdAt", "updatedAt"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "kind": { "default": "pinned", "type": "string", "enum": ["pinned", "highlight"] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdPinsByUnitId", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdPinsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Realm pin", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "kind", "in": "query", "required": false, "schema": { "default": "pinned", "type": "string", "enum": ["pinned", "highlight"] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } } }, "required": true }, "operationId": "deleteApiRealmsByRealmIdPinsByUnitId", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdPinsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/wikis": { "post": { "summary": "Create Realm-governed Wiki", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["title", "body", "language"], "properties": { "accessMode": { "type": "string", "enum": ["community_owned", "restricted"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "subjectId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id"], "properties": { "id": { "format": "uuid", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired", "EntityAssociationRestricted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "EntityEntryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmRulesAcceptanceRequired", "type": "string", "enum": ["RealmRulesAcceptanceRequired", "PostTargetingLocked"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealmsByRealmIdWikis", "x-rezics-quota-route-operation-id": "postApiRealmsByRealmIdWikis", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tag-contexts": { "get": { "summary": "List Realm Tag Context relationships", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "realmId", "tagId", "contextPostId", "createdByProfileId", "createdAt", "updatedAt", "tagReadable", "tagLanguage", "tagTitle", "contextReadable", "contextLanguage", "contextTitle" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "tagReadable": { "type": "boolean" }, "tagLanguage": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "tagTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "contextReadable": { "type": "boolean" }, "contextLanguage": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "contextTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdTag-contexts", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdTag-contexts", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Realm Tag Context Wiki", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["tagId", "title", "summary", "body", "language"], "properties": { "tagId": { "format": "uuid", "type": "string" }, "accessMode": { "type": "string", "enum": ["community_owned", "restricted"] }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "summary": { "minLength": 1, "maxLength": 2000, "type": "string" }, "body": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "tagId", "contextPostId", "createdByProfileId", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextAlreadyExists", "type": "string", "enum": [ "RealmTagContextAlreadyExists", "RealmRulesAcceptanceRequired", "PostTargetingLocked" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ValidationError", "type": "string", "enum": ["ValidationError"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealmsByRealmIdTag-contexts", "x-rezics-quota-route-operation-id": "postApiRealmsByRealmIdTag-contexts", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/tags/{tagId}/context": { "get": { "summary": "Get Realm Tag Context", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "tagId", "contextPostId", "createdByProfileId", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmNotFound", "type": "string", "enum": ["RealmNotFound", "PostNotFound", "RealmTagContextNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Set Realm Tag Context", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["contextPostId"], "properties": { "contextPostId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "tagId", "contextPostId", "createdByProfileId", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "createdByProfileId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "PostNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextPostAlreadyUsed", "type": "string", "enum": ["RealmTagContextPostAlreadyUsed"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextPostNotMounted", "type": "string", "enum": ["RealmTagContextPostNotMounted"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Realm Tag Context relationship", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextNotFound", "type": "string", "enum": ["RealmTagContextNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextInUse", "type": "string", "enum": ["RealmTagContextInUse"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdTagsByTagIdContext", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/policy-tags/{tagId}": { "put": { "summary": "Apply Realm Policy Tag", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "position": { "format": "fractional-position", "minLength": 2, "maxLength": 512, "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "unitId", "tagId", "position", "createdByProfileId", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "createdByProfileId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmUnitNotFound", "type": "string", "enum": ["RealmUnitNotFound", "UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagSelfReferenceForbidden", "type": "string", "enum": [ "RealmTagSelfReferenceForbidden", "TagNotDirectlyApplicable", "ContentLabelApplicationInvalid" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdUnitsByUnitIdPolicy-tagsByTagId", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdUnitsByUnitIdPolicy-tagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove Realm Policy Tag", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiRealmsByRealmIdUnitsByUnitIdPolicy-tagsByTagId", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdUnitsByUnitIdPolicy-tagsByTagId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/tags": { "get": { "summary": "List Realm-scoped Unit Tag votes", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 50, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "tags"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tags": { "type": "array", "items": { "type": "object", "required": [ "tagId", "language", "title", "summary", "avatar", "createdAt", "updatedAt", "realmId", "contextPostId", "score", "voteCount", "viewerVote" ], "properties": { "tagId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "viewerVote": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdUnitsByUnitIdTags", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdUnitsByUnitIdTags", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/tags/{tagId}/vote": { "put": { "summary": "Vote on a Realm-scoped Unit Tag", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["value"], "properties": { "value": { "type": "string", "enum": [-1, 1] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "tagId", "value", "score", "voteCount"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "value": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagVotingDisabled", "type": "string", "enum": ["RealmTagVotingDisabled"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmTagContextRequired", "type": "string", "enum": [ "RealmTagContextRequired", "RealmTagSelfReferenceForbidden", "ContentLabelJudgmentForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdUnitsByUnitIdTagsByTagIdVote", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdUnitsByUnitIdTagsByTagIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Remove a Realm-scoped Unit Tag vote", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "tagId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["realmId", "unitId", "tagId", "value", "score", "voteCount"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "tagId": { "format": "uuid", "type": "string" }, "value": { "nullable": true, "anyOf": [ { "anyOf": [ { "const": -1, "type": "number" }, { "const": 1, "type": "number" } ] }, { "type": "null" } ] }, "score": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "voteCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": [ "RealmCapabilityRequired", "UnitAccessRestricted", "UnitPermissionForbidden" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "Response for status 429", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "VoteHotKeyBusy", "type": "string", "enum": ["VoteHotKeyBusy"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } ] } } }, "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "deleteApiRealmsByRealmIdUnitsByUnitIdTagsByTagIdVote", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdUnitsByUnitIdTagsByTagIdVote", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units": { "get": { "summary": "List Realm Units for moderation", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "default": "current", "type": "string", "enum": ["current", "pending", "visible", "hidden", "removed", "all"] } }, { "name": "publicationState", "in": "query", "required": false, "schema": { "default": "active", "type": "string", "enum": ["active", "withdrawn", "all"] } }, { "name": "reported", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } }, { "name": "cursor", "in": "query", "required": false, "schema": { "minLength": 1, "maxLength": 1024, "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "nextCursor"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "realmId", "unitId", "unitKind", "language", "title", "status", "publicationState", "postTargetingLocked", "openReportCount", "allowedCommands", "moderationStatus", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, "publicationState": { "default": "active", "type": "string", "enum": ["active", "withdrawn"] }, "postTargetingLocked": { "type": "boolean" }, "openReportCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "allowedCommands": { "minItems": 1, "type": "array", "items": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "dismiss", "note" ] } }, "moderationStatus": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "nextCursor": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidPaginationCursor", "type": "string", "enum": ["InvalidPaginationCursor"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdUnits", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdUnits", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}": { "get": { "summary": "Get Realm Unit for moderation", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "localizationLanguages", "in": "query", "required": false, "schema": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "realmId", "unitId", "unitKind", "language", "title", "status", "publicationState", "postTargetingLocked", "openReportCount", "allowedCommands", "moderationStatus", "createdAt", "updatedAt" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "unitId": { "format": "uuid", "type": "string" }, "unitKind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "status": { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, "publicationState": { "default": "active", "type": "string", "enum": ["active", "withdrawn"] }, "postTargetingLocked": { "type": "boolean" }, "openReportCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "allowedCommands": { "minItems": 1, "type": "array", "items": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "dismiss", "note" ] } }, "moderationStatus": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmUnitNotFound", "type": "string", "enum": ["RealmUnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdUnitsByUnitId", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "patch": { "summary": "Apply a Realm content governance action", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["command", "rules"], "properties": { "idempotencyKey": { "minLength": 1, "maxLength": 256, "type": "string" }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } }, "command": { "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting" ] }, "rules": { "minItems": 1, "maxItems": 32, "uniqueItems": true, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "annotation": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "type": "string", "enum": ["internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "caseId", "actorProfileId", "kind", "previousState", "resultingState", "previousPostTargetingLocked", "licenseGrantId", "previousRecognitionStatus", "resultingRecognitionStatus", "resultingPostTargetingLocked", "reversesActionId", "rules", "notes", "createdAt", "target" ], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "actorProfileId": { "format": "uuid", "type": "string" }, "kind": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "previousState": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "resultingState": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "previousPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "licenseGrantId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "previousRecognitionStatus": { "nullable": true, "anyOf": [ { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] }, { "type": "null" } ] }, "resultingRecognitionStatus": { "nullable": true, "anyOf": [ { "default": "recognized", "type": "string", "enum": ["recognized", "invalidated"] }, { "type": "null" } ] }, "resultingPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "reversesActionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "rules": { "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "notes": { "type": "array", "items": { "type": "object", "required": ["postId", "role"], "properties": { "postId": { "format": "uuid", "type": "string" }, "role": { "type": "string", "enum": ["evidence", "internal_note", "public_notice"] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "target": { "type": "object", "required": [ "status", "publicationState", "postTargetingLocked", "openReportCount", "allowedCommands", "updatedAt" ], "properties": { "status": { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, "publicationState": { "default": "active", "type": "string", "enum": ["active", "withdrawn"] }, "postTargetingLocked": { "type": "boolean" }, "openReportCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "allowedCommands": { "minItems": 1, "type": "array", "items": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "dismiss", "note" ] } }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentGovernanceActionIncompatible", "type": "string", "enum": [ "ContentGovernanceActionIncompatible", "GovernanceRuleSourceForbidden", "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmUnitNotFound", "type": "string", "enum": ["RealmUnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentGovernanceTransitionInvalid", "type": "string", "enum": [ "ContentGovernanceTransitionInvalid", "ContentGovernanceActionNoEffect", "ContentGovernanceIdempotencyConflict", "GovernanceRuleChanged", "PostTargetingLocked" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "patchApiRealmsByRealmIdUnitsByUnitId", "x-rezics-quota-route-operation-id": "patchApiRealmsByRealmIdUnitsByUnitId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/history": { "get": { "summary": "Get Realm Unit moderation history", "tags": ["Realms"], "security": [{ "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "minimum": 1, "maximum": 100, "default": 50, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 100, "default": 50, "type": "integer" } ] } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "caseId", "kind", "actorProfileId", "actorName", "previousState", "resultingState", "previousPostTargetingLocked", "resultingPostTargetingLocked", "rules", "reversesActionId", "notes", "createdAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "caseId": { "format": "uuid", "type": "string" }, "kind": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "invalidate_license", "restore_license", "reverse" ] }, "actorProfileId": { "format": "uuid", "type": "string" }, "actorName": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "previousState": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, { "type": "null" } ] }, "resultingState": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, { "type": "null" } ] }, "previousPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "resultingPostTargetingLocked": { "nullable": true, "anyOf": [{ "type": "boolean" }, { "type": "null" }] }, "rules": { "maxItems": 32, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["sourceRealmId", "revisionId", "ruleId"], "properties": { "sourceRealmId": { "format": "uuid", "type": "string" }, "revisionId": { "format": "uuid", "type": "string" }, "ruleId": { "format": "uuid", "type": "string" } } } }, "reversesActionId": { "nullable": true, "anyOf": [{ "format": "uuid", "type": "string" }, { "type": "null" }] }, "notes": { "type": "array", "items": { "type": "object", "required": [ "postId", "latestRevisionId", "role", "language", "content", "createdAt", "updatedAt" ], "properties": { "postId": { "format": "uuid", "type": "string" }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "role": { "type": "string", "enum": ["internal_note", "public_notice"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } }, "createdAt": { "format": "date-time", "type": "string" } } } } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmUnitNotFound", "type": "string", "enum": ["RealmUnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdUnitsByUnitIdHistory", "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdUnitsByUnitIdHistory", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/units/{unitId}/review": { "post": { "summary": "Update a Realm content review case", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "unitId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["command"], "properties": { "command": { "const": "dismiss", "type": "string" }, "annotation": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["command", "annotation"], "properties": { "command": { "const": "note", "type": "string" }, "annotation": { "additionalProperties": false, "type": "object", "required": ["role", "language", "content"], "properties": { "role": { "anyOf": [ { "const": "internal_note", "type": "string" }, { "const": "public_notice", "type": "string" } ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "content": { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } } } }, "revisionContext": { "additionalProperties": false, "type": "object", "properties": { "contribution": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "human", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary"], "properties": { "primary": { "const": "unattributed", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["primary", "creditedEntityId", "role"], "properties": { "primary": { "const": "ai", "type": "string" }, "creditedEntityId": { "format": "uuid", "type": "string" }, "role": { "default": "creator", "type": "string", "enum": ["creator", "editor", "translator", "researcher"] } } } ] } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["caseId", "caseState", "target"], "properties": { "caseId": { "format": "uuid", "type": "string" }, "caseState": { "type": "string", "enum": [ "new", "triaged", "assigned", "actioned", "resolved", "duplicate", "rejected", "escalated", "reviewing" ] }, "target": { "type": "object", "required": [ "status", "publicationState", "postTargetingLocked", "openReportCount", "allowedCommands", "updatedAt" ], "properties": { "status": { "type": "string", "enum": ["pending", "visible", "hidden", "removed"] }, "publicationState": { "default": "active", "type": "string", "enum": ["active", "withdrawn"] }, "postTargetingLocked": { "type": "boolean" }, "openReportCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, "allowedCommands": { "minItems": 1, "type": "array", "items": { "default": "approve", "type": "string", "enum": [ "approve", "hide", "remove", "restore", "lock_post_targeting", "unlock_post_targeting", "dismiss", "note" ] } }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RevisionCreditEntityInvalid", "type": "string", "enum": [ "RevisionCreditEntityInvalid", "RevisionContributionActorRequired" ] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmCapabilityRequired", "type": "string", "enum": ["RealmCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "RealmUnitNotFound", "type": "string", "enum": ["RealmUnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentGovernanceActionNoEffect", "type": "string", "enum": ["ContentGovernanceActionNoEffect"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealmsByRealmIdUnitsByUnitIdReview", "x-rezics-quota-route-operation-id": "postApiRealmsByRealmIdUnitsByUnitIdReview", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/wiki/navigation": { "get": { "summary": "List Realm Wiki navigation resources", "description": "Development preview. Requires platform.development_preview.access in addition to ordinary Realm Wiki navigation authorization.", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "realmId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdWikiNavigation", "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdWikiNavigation", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "post": { "summary": "Create Realm Wiki navigation", "description": "Development preview. Requires platform.development_preview.access in addition to ordinary Realm Wiki navigation authorization.", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["document"], "properties": { "document": { "$ref": "#/components/schemas/NavigationDocument" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "realmId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "WikiNavigationDocumentInvalid", "type": "string", "enum": ["WikiNavigationDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiRealmsByRealmIdWikiNavigation", "x-rezics-quota-route-operation-id": "postApiRealmsByRealmIdWikiNavigation", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/realms/{realmId}/wiki/navigation/{navigationId}": { "get": { "summary": "Get Realm Wiki navigation", "description": "Development preview. Requires platform.development_preview.access in addition to ordinary Realm Wiki navigation authorization.", "tags": ["Realms"], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "realmId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "WikiNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiRealmsByRealmIdWikiNavigationByNavigationId", "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "getApiRealmsByRealmIdWikiNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "put": { "summary": "Replace Realm Wiki navigation", "description": "Development preview. Requires platform.development_preview.access in addition to ordinary Realm Wiki navigation authorization.", "tags": ["Realms"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["document", "baseRevisionId"], "properties": { "document": { "$ref": "#/components/schemas/NavigationDocument" }, "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "realmId", "document", "latestRevisionId", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "document": { "$ref": "#/components/schemas/NavigationDocument" }, "latestRevisionId": { "format": "uuid", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Response for status 400", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "WikiNavigationDocumentInvalid", "type": "string", "enum": ["WikiNavigationDocumentInvalid"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/MalformedRequestBody" } ] } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "WikiNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ContentStructureRevisionConflict", "type": "string", "enum": ["ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiRealmsByRealmIdWikiNavigationByNavigationId", "x-rezics-quota-route-operation-id": "putApiRealmsByRealmIdWikiNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete Realm Wiki navigation", "description": "Development preview. Requires platform.development_preview.access in addition to ordinary Realm Wiki navigation authorization.", "tags": ["Realms"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "403": { "description": "Response for status 403", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "PlatformCapabilityRequired", "type": "string", "enum": ["PlatformCapabilityRequired", "UnitPermissionForbidden"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "WikiNavigationNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "WikiNavigationInUse", "type": "string", "enum": ["WikiNavigationInUse", "ContentStructureRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "realmId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "navigationId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["baseRevisionId"], "properties": { "baseRevisionId": { "format": "uuid", "type": "string" } } } } }, "required": true }, "operationId": "deleteApiRealmsByRealmIdWikiNavigationByNavigationId", "x-rezics-quota-route-operation-id": "deleteApiRealmsByRealmIdWikiNavigationByNavigationId", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/filter": { "get": { "summary": "Get the global Filter capability definition", "tags": ["Search"], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFeatureDefinition" } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiSearchFilter", "x-rezics-quota-route-operation-id": "getApiSearchFilter", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/filter/definition": { "post": { "summary": "Resolve a Filter document", "tags": ["Search"], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FilterDocument" } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFeatureDefinition" } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiSearchFilterDefinition", "x-rezics-quota-route-operation-id": "postApiSearchFilterDefinition", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/filter/execute": { "post": { "summary": "Execute a Filter document", "tags": ["Search"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["filterDocument", "contexts", "injections", "state"], "properties": { "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "contexts": { "maxItems": 4, "type": "array", "items": { "$id": "SearchFeatureContext", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "realmId"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "zoneId"], "properties": { "kind": { "const": "zone", "type": "string" }, "zoneId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId", "includeDescendants"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "includeDescendants": { "default": false, "type": "boolean" } } } ] } }, "injections": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "SearchInjection", "type": "object", "required": ["source", "value", "removable"], "properties": { "source": { "type": "string", "enum": ["tag", "link"] }, "value": { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, "removable": { "default": true, "type": "boolean" } } } }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["query", "groups"], "properties": { "query": { "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "groups": { "type": "array", "items": { "type": "object", "required": ["index", "hits", "total", "limit", "processingTimeMs"], "properties": { "index": { "type": "string" }, "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchFilterExecute", "x-rezics-quota-route-operation-id": "postApiSearchFilterExecute", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/filter/feed": { "post": { "summary": "Present a Filter document as a Feed", "tags": ["Search"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["filterDocument", "contexts", "injections", "state", "surface"], "properties": { "filterDocument": { "$ref": "#/components/schemas/FilterDocument" }, "contexts": { "maxItems": 4, "type": "array", "items": { "$id": "SearchFeatureContext", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "realmId"], "properties": { "kind": { "const": "realm", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profileId"], "properties": { "kind": { "const": "profile", "type": "string" }, "profileId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "zoneId"], "properties": { "kind": { "const": "zone", "type": "string" }, "zoneId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "unitId", "includeDescendants"], "properties": { "kind": { "const": "unit", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "includeDescendants": { "default": false, "type": "boolean" } } } ] } }, "injections": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "SearchInjection", "type": "object", "required": ["source", "value", "removable"], "properties": { "source": { "type": "string", "enum": ["tag", "link"] }, "value": { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, "removable": { "default": true, "type": "boolean" } } } }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "surface": { "type": "string", "enum": ["search", "feed"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "total"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchFilterFeed", "x-rezics-quota-route-operation-id": "postApiSearchFilterFeed", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/zones/{zoneId}/filter": { "get": { "summary": "Get a Zone Filter definition", "tags": ["Search", "Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchFeatureDefinition" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiSearchZonesByZoneIdFilter", "x-rezics-quota-route-operation-id": "getApiSearchZonesByZoneIdFilter", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/zones/{zoneId}/filter/execute": { "post": { "summary": "Execute a Zone Filter", "tags": ["Search", "Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["injections", "state"], "properties": { "injections": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "SearchInjection", "type": "object", "required": ["source", "value", "removable"], "properties": { "source": { "type": "string", "enum": ["tag", "link"] }, "value": { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, "removable": { "default": true, "type": "boolean" } } } }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["query", "groups"], "properties": { "query": { "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "groups": { "type": "array", "items": { "type": "object", "required": ["index", "hits", "total", "limit", "processingTimeMs"], "properties": { "index": { "type": "string" }, "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdFilterExecute", "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdFilterExecute", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/zones/{zoneId}/filter/feed": { "post": { "summary": "Present a Zone Filter as a Feed", "tags": ["Search", "Zones"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["injections", "state", "surface"], "properties": { "injections": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "SearchInjection", "type": "object", "required": ["source", "value", "removable"], "properties": { "source": { "type": "string", "enum": ["tag", "link"] }, "value": { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, "removable": { "default": true, "type": "boolean" } } } }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "surface": { "type": "string", "enum": ["search", "feed"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "total"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdFilterFeed", "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdFilterFeed", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/zones/{zoneId}/dock/block-executions": { "post": { "summary": "Execute a trusted Zone Dock Search Block", "tags": ["Search"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["state", "path"], "properties": { "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["query", "groups"], "properties": { "query": { "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "groups": { "type": "array", "items": { "type": "object", "required": ["index", "hits", "total", "limit", "processingTimeMs"], "properties": { "index": { "type": "string" }, "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } }, "hidden": { "type": "boolean" }, "selected": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdDockBlock-executions", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdDockBlock-executions", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/search/zones/{zoneId}/pages/{pageId}/execute": { "post": { "summary": "Execute persisted query Blocks for a Zone Page surface", "tags": ["Search", "Zones"], "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "pageRevision": { "format": "uuid", "type": "string" }, "includeDock": { "default": true, "type": "boolean" }, "pageBlocks": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["path"], "properties": { "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } } } } }, "dockBlocks": { "minItems": 1, "maxItems": 8, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["path"], "properties": { "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } } } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["pageRevision", "page"], "properties": { "pageRevision": { "format": "uuid", "type": "string" }, "page": { "additionalProperties": false, "type": "object", "required": ["results"], "properties": { "results": { "maxItems": 24, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["path", "outcome"], "properties": { "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } }, "outcome": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "unit-list", "type": "string" }, "itemKind": { "const": "search-hit", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": [ "id", "type", "language", "title", "cover" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": [ "book", "software", "media", "entity" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "unit-list", "type": "string" }, "itemKind": { "const": "feed-item", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": [ "post", "reply", "excerpt", "chapter", "picture" ] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "realmId", "realmTitle", "value" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": [ "id", "language", "title", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "feed", "type": "string" }, "itemKind": { "const": "feed-item", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": [ "post", "reply", "excerpt", "chapter", "picture" ] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "realmId", "realmTitle", "value" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": [ "id", "language", "title", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "code"], "properties": { "kind": { "const": "error", "type": "string" }, "code": { "default": "InvalidSearch", "type": "string", "enum": [ "InvalidSearch", "SearchTimeout", "SearchUnavailable", "CollectionNotFound", "UnitNotFound" ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "reason"], "properties": { "kind": { "const": "skipped", "type": "string" }, "reason": { "anyOf": [ { "const": "budget", "type": "string" }, { "const": "inactive-tab", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hidden", "type": "string" } } } ] } } } } } }, "dock": { "additionalProperties": false, "type": "object", "required": ["results"], "properties": { "results": { "maxItems": 6, "type": "array", "items": { "additionalProperties": false, "type": "object", "required": ["path", "outcome"], "properties": { "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } }, "outcome": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "unit-list", "type": "string" }, "itemKind": { "const": "search-hit", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": [ "id", "type", "language", "title", "cover" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": [ "book", "software", "media", "entity" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "unit-list", "type": "string" }, "itemKind": { "const": "feed-item", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": [ "post", "reply", "excerpt", "chapter", "picture" ] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "realmId", "realmTitle", "value" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": [ "id", "language", "title", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "blockType", "itemKind", "items"], "properties": { "kind": { "const": "ok", "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] }, "resolvedSort": { "anyOf": [ { "const": "best", "type": "string" }, { "const": "relevance", "type": "string" }, { "const": "createdAt:asc", "type": "string" }, { "const": "createdAt:desc", "type": "string" }, { "const": "updatedAt:asc", "type": "string" }, { "const": "updatedAt:desc", "type": "string" }, { "const": "publishedAt:asc", "type": "string" }, { "const": "publishedAt:desc", "type": "string" }, { "const": "followerCount:asc", "type": "string" }, { "const": "followerCount:desc", "type": "string" }, { "const": "replyCount:asc", "type": "string" }, { "const": "replyCount:desc", "type": "string" }, { "const": "closesAt:asc", "type": "string" }, { "const": "closesAt:desc", "type": "string" }, { "const": "title:asc", "type": "string" }, { "const": "title:desc", "type": "string" }, { "const": "progressLastSeenAt:asc", "type": "string" }, { "const": "progressLastSeenAt:desc", "type": "string" } ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "selected": { "type": "object", "required": [ "id", "kind", "language", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "blockType": { "const": "feed", "type": "string" }, "itemKind": { "const": "feed-item", "type": "string" }, "items": { "maxItems": 20, "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": [ "post", "reply", "excerpt", "chapter", "picture" ] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": [ "scoreId", "realmId", "realmTitle", "value" ], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] } }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": [ "_key", "_type", "children" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": [ "_key", "_type", "text" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": [ "_key", "_type", "unitId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": [ "_key", "_type" ], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": [ "_key", "_type", "assetId" ], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": [ "id", "language", "title", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "type", "image" ], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": [ "id", "url" ], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "emoji" ], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": [ "type", "icon" ], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": [ "fas", "fab" ] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "code"], "properties": { "kind": { "const": "error", "type": "string" }, "code": { "default": "InvalidSearch", "type": "string", "enum": [ "InvalidSearch", "SearchTimeout", "SearchUnavailable", "CollectionNotFound", "UnitNotFound" ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "reason"], "properties": { "kind": { "const": "skipped", "type": "string" }, "reason": { "anyOf": [ { "const": "budget", "type": "string" }, { "const": "inactive-tab", "type": "string" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "hidden", "type": "string" } } } ] } } } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitRevisionConflict", "type": "string", "enum": ["UnitRevisionConflict"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiSearchZonesByZoneIdPagesByPageIdExecute", "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdPagesByPageIdExecute", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/zones/{zoneId}/pages/{pageId}/block-executions": { "post": { "summary": "Execute a trusted Zone Page Search Block", "tags": ["Search"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["state", "path"], "properties": { "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["query", "groups"], "properties": { "query": { "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "groups": { "type": "array", "items": { "type": "object", "required": ["index", "hits", "total", "limit", "processingTimeMs"], "properties": { "index": { "type": "string" }, "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } }, "hidden": { "type": "boolean" }, "selected": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdPagesByPageIdBlock-executions", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdPagesByPageIdBlock-executions", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/search/zones/{zoneId}/dock/feed-block-executions": { "post": { "summary": "Execute a trusted Zone Dock Feed Block", "tags": ["Feed"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["state", "path"], "properties": { "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "total"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "hidden": { "type": "boolean" }, "selected": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "DockNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdDockFeed-block-executions", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdDockFeed-block-executions", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/search/zones/{zoneId}/pages/{pageId}/feed-block-executions": { "post": { "summary": "Execute a trusted Zone Page Feed Block", "tags": ["Feed"], "parameters": [ { "name": "zoneId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "pageId", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["state", "path"], "properties": { "state": { "additionalProperties": false, "$id": "SearchFeatureState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" }, "path": { "minItems": 1, "maxItems": 16, "$id": "BlockPath", "type": "array", "items": { "additionalProperties": false, "$id": "BlockPathSegment", "type": "object", "required": ["slot", "key"], "properties": { "slot": { "type": "string", "enum": ["blocks", "columns", "tabs"] }, "key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" } } } } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["items", "total"], "properties": { "items": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "postKind", "summary", "cover", "collection", "presentation" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "unit", "type": "string" }, "unitKind": { "default": "profile", "type": "string", "enum": [ "profile", "book", "software", "media", "video", "audio", "release", "entity", "tag", "series", "zone", "collection", "poll", "realm" ] }, "postKind": { "type": "null" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "collection": { "nullable": true, "anyOf": [ { "type": "object", "required": ["directItemCount"], "properties": { "directItemCount": { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] } } }, { "type": "null" } ] }, "presentation": { "anyOf": [ { "type": "object", "required": ["kind", "scores"], "properties": { "kind": { "const": "rated-work", "type": "string" }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "object", "required": [ "kind", "avatar", "banner", "memberCount", "realmTagContext" ], "properties": { "kind": { "const": "identity", "type": "string" }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "banner": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "memberCount": { "nullable": true, "anyOf": [ { "minimum": 0, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "type": "integer" } ] }, { "type": "null" } ] }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "contextPostId", "language", "summary" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "contextPostId": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } }, { "type": "null" } ] } } }, { "type": "object", "required": ["kind"], "properties": { "kind": { "const": "general", "type": "string" } } } ] } } }, { "anyOf": [ { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "default": "post", "type": "string", "enum": ["post", "reply", "excerpt", "chapter", "picture"] } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "review", "type": "string" }, "scores": { "type": "array", "items": { "type": "object", "required": ["scoreId", "realmId", "realmTitle", "value"], "properties": { "scoreId": { "format": "uuid", "type": "string" }, "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "value": { "minimum": 1, "maximum": 10, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10, "type": "integer" } ] } } } } } }, { "type": "object", "required": [ "id", "language", "availableLanguages", "attributions", "realmId", "realms", "title", "createdAt", "updatedAt", "reactions", "viewerReaction", "recommendationReason", "tracking", "itemType", "unitKind", "summary", "cover", "subjectId", "rootPostId", "parentPostId", "body", "contentSpoiler", "contentNsfw", "replyCount", "latestRevisionId", "replyContext", "subject", "postKind", "realmTagContext" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "nullable": true, "anyOf": [ { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, { "type": "null" } ] }, "availableLanguages": { "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "attributions": { "type": "array", "items": { "type": "object", "required": ["id", "role", "position", "creditedUnit"], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "realmId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "realms": { "type": "array", "items": { "type": "object", "required": [ "id", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "reactions": { "type": "object", "required": ["upvote", "downvote"], "properties": { "upvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "downvote": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] } } }, "viewerReaction": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "recommendationReason": { "nullable": true, "anyOf": [ { "default": "followed_unit", "type": "string", "enum": [ "followed_unit", "followed_realm", "based_on_activity", "related_subject", "popular_now", "new_and_relevant" ] }, { "type": "null" } ] }, "tracking": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "requestId", "surface", "position", "policyVersion", "signature" ], "properties": { "requestId": { "format": "uuid", "type": "string" }, "surface": { "default": "home_feed", "type": "string", "enum": [ "home_feed", "home_book", "home_software", "home_media", "unit_related", "post_related" ] }, "position": { "minimum": 0, "maximum": 999, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 0, "maximum": 999, "type": "integer" } ] }, "policyVersion": { "minLength": 1, "maxLength": 64, "pattern": "\\S", "type": "string" }, "signature": { "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]{43}$", "type": "string" } } }, { "type": "null" } ] }, "itemType": { "const": "post", "type": "string" }, "unitKind": { "const": "post", "type": "string" }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "rootPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "parentPostId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "body": { "nullable": true, "anyOf": [ { "additionalProperties": false, "$id": "PortableTextDocument", "type": "object", "required": ["_type", "_key", "content"], "properties": { "_type": { "const": "portable-text", "type": "string" }, "_key": { "pattern": "^[0-9a-f]{12}$", "$id": "BlockKey", "type": "string" }, "styleRoles": { "maxItems": 8, "uniqueItems": true, "type": "array", "items": { "minLength": 1, "maxLength": 48, "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$", "type": "string" } }, "content": { "$id": "PortableText", "type": "array", "items": { "$id": "PortableTextBlock", "anyOf": [ { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextTextBlock", "type": "object", "required": ["_key", "_type", "children"], "properties": { "_key": { "type": "string" }, "_type": { "const": "block", "type": "string" }, "children": { "type": "array", "items": { "$id": "PortableTextChild", "anyOf": [ { "additionalProperties": false, "$id": "PortableTextSpan", "type": "object", "required": ["_key", "_type", "text"], "properties": { "_key": { "type": "string" }, "_type": { "const": "span", "type": "string" }, "text": { "type": "string" }, "marks": { "type": "array", "items": { "type": "string" } } } }, { "additionalProperties": false, "$id": "PortableTextUnitMention", "type": "object", "required": ["_key", "_type", "unitId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "unit-mention", "type": "string" }, "unitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } ] } }, "markDefs": { "type": "array", "items": { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "$id": "PortableTextObject", "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "type": "string" } } } }, "listItem": { "type": "string" }, "style": { "type": "string" }, "level": { "minimum": 1, "type": "integer" } } }, { "additionalProperties": false, "$id": "PortableTextImage", "type": "object", "required": ["_key", "_type", "assetId"], "properties": { "_key": { "type": "string" }, "_type": { "const": "image", "type": "string" }, "assetId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "alt": { "type": "string" }, "caption": { "type": "string" } } }, { "additionalProperties": { "$id": "#/components/schemas/JsonValue", "anyOf": [ { "type": "null" }, { "type": "boolean" }, { "type": "number" }, { "type": "string" }, { "type": "array", "items": { "$ref": "#/components/schemas/JsonValue" } }, { "type": "object", "patternProperties": { "^(.*)$": { "$ref": "#/components/schemas/JsonValue" } } } ] }, "type": "object", "required": ["_key", "_type"], "properties": { "_key": { "type": "string" }, "_type": { "pattern": "^(?!(?:block|image)$).+", "type": "string" } } } ] } } } }, { "type": "null" } ] }, "contentSpoiler": { "type": "object", "required": ["level", "concealed"], "properties": { "level": { "anyOf": [ { "const": 0, "type": "number" }, { "const": 1, "type": "number" }, { "const": 2, "type": "number" } ] }, "concealed": { "type": "boolean" } } }, "contentNsfw": { "type": "object", "required": ["labelled", "concealed"], "properties": { "labelled": { "type": "boolean" }, "concealed": { "type": "boolean" } } }, "replyCount": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "latestRevisionId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] }, "replyContext": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "rootPostId", "title", "attributions", "subjectId" ], "properties": { "rootPostId": { "format": "uuid", "type": "string" }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "attributions": { "type": "array", "items": { "type": "object", "required": [ "id", "role", "position", "creditedUnit" ], "properties": { "id": { "format": "uuid", "type": "string" }, "role": { "default": "author", "type": "string", "enum": [ "author", "co-author", "translator", "illustrator", "editor", "publisher", "letterer", "colorist", "developer", "composer", "designer", "director", "producer", "writer", "actor", "narrator", "studio", "distributor" ] }, "position": { "format": "fractional-position", "minLength": 2, "maxLength": 1024, "type": "string" }, "creditedUnit": { "type": "object", "required": [ "id", "kind", "language", "slugAddress", "title", "summary", "avatar" ], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": [ "zh", "en", "ja", "ko", "de", "fr", "es" ] }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "slug", "scopeUnitId", "canonicalPath" ], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "title": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } } }, "subjectId": { "nullable": true, "anyOf": [ { "format": "uuid", "type": "string" }, { "type": "null" } ] } } }, { "type": "null" } ] }, "subject": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "id", "type", "language", "title", "summary", "cover", "scores" ], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] }, "scores": { "type": "object", "required": ["preferred", "global"], "properties": { "preferred": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] }, "global": { "nullable": true, "anyOf": [ { "type": "object", "required": [ "realmId", "realmTitle", "totalScore", "totalCount" ], "properties": { "realmId": { "format": "uuid", "type": "string" }, "realmTitle": { "nullable": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "totalScore": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "totalCount": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] } } }, { "type": "null" } ] } } } } }, { "type": "null" } ] }, "postKind": { "const": "wiki", "type": "string" }, "realmTagContext": { "nullable": true, "anyOf": [ { "type": "object", "required": ["realmId", "tag"], "properties": { "realmId": { "format": "uuid", "type": "string" }, "tag": { "type": "object", "required": ["id", "language", "title", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": [ "provider", "prefix", "name" ], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } } } }, { "type": "null" } ] } } } ] } ] } }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "hidden": { "type": "boolean" }, "selected": { "type": "object", "required": ["id", "kind", "language", "title", "summary", "avatar"], "properties": { "id": { "format": "uuid", "type": "string" }, "kind": { "default": "slug_namespace", "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "tag_path", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] } } }, "selectionSeed": { "minLength": 1, "maxLength": 128, "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "UnitNotFound", "type": "string", "enum": ["UnitNotFound", "ZonePageNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchZonesByZoneIdPagesByPageIdFeed-block-executions", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchZonesByZoneIdPagesByPageIdFeed-block-executions", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/search": { "post": { "summary": "Search across public categories", "tags": ["Search"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "query": { "maxLength": 500, "default": "", "type": "string" }, "indexes": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "Languages": { "maxItems": 50, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "limitPerIndex": { "minimum": 1, "maximum": 20, "default": 5, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 20, "default": 5, "type": "integer" } ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["query", "groups"], "properties": { "query": { "type": "string" }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "advisory": { "additionalProperties": false, "type": "object", "required": ["code", "requestedSort", "resolvedSort"], "properties": { "code": { "const": "PersistedSortUnavailable", "type": "string" }, "requestedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "resolvedSort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } }, "facets": { "type": "array", "items": { "type": "object", "required": ["field", "options"], "properties": { "controlKey": { "type": "string" }, "field": { "type": "string" }, "options": { "type": "array", "items": { "type": "object", "required": ["value", "count"], "properties": { "value": { "type": "string" }, "count": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] } } } } } } }, "groups": { "type": "array", "items": { "type": "object", "required": ["index", "hits", "total", "limit", "processingTimeMs"], "properties": { "index": { "type": "string" }, "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearch", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearch", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/search/shared-queries": { "post": { "summary": "Create an immutable shared Search query", "tags": ["Search"], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "$id": "SharedSearchQueryDocument", "type": "object", "required": ["filterDocument", "state", "selections"], "properties": { "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } }, "state": { "additionalProperties": false, "$id": "SharedSearchQueryState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "selections": { "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "$id": "SharedSearchQuerySelection", "type": "object", "required": ["field", "value", "title", "kind"], "properties": { "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "value": { "minLength": 1, "maxLength": 500, "type": "string" }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "kind": { "minLength": 1, "maxLength": 100, "type": "string" } } } } } } } }, "required": true }, "responses": { "201": { "description": "Response for status 201", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "document", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "document": { "additionalProperties": false, "$id": "SharedSearchQueryDocument", "type": "object", "required": ["filterDocument", "state", "selections"], "properties": { "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } }, "state": { "additionalProperties": false, "$id": "SharedSearchQueryState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "selections": { "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "$id": "SharedSearchQuerySelection", "type": "object", "required": ["field", "value", "title", "kind"], "properties": { "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "value": { "minLength": 1, "maxLength": 500, "type": "string" }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "kind": { "minLength": 1, "maxLength": 100, "type": "string" } } } } } }, "createdAt": { "format": "date-time", "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiSearchShared-queries", "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchShared-queries", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/shared-queries/{id}": { "get": { "summary": "Get a shared Search query", "tags": ["Search"], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["id", "document", "createdAt"], "properties": { "id": { "format": "uuid", "type": "string" }, "document": { "additionalProperties": false, "$id": "SharedSearchQueryDocument", "type": "object", "required": ["filterDocument", "state", "selections"], "properties": { "filterDocument": { "additionalProperties": false, "$id": "FilterDocument", "type": "object", "properties": { "categories": { "minItems": 1, "maxItems": 9, "type": "array", "items": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } }, "where": { "$id": "UnitPredicate", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/UnitPredicate" } }, "not": { "$ref": "#/components/schemas/UnitPredicate" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": [ "slug_namespace", "profile", "book", "software", "media", "video", "audio", "release", "entity", "label", "tag", "series", "zone", "zone_page", "zone_theme", "collection", "post", "poll", "realm", "realm_rule" ] } } } }, "localizations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "LocalizationFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/LocalizationFilter" } }, "not": { "$ref": "#/components/schemas/LocalizationFilter" }, "language": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "zh", "type": "string" }, { "const": "en", "type": "string" }, { "const": "ja", "type": "string" }, { "const": "ko", "type": "string" }, { "const": "de", "type": "string" }, { "const": "fr", "type": "string" }, { "const": "es", "type": "string" } ] } } } } } } } } ] }, "contentLanguageSupport": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "additionalProperties": false, "type": "object", "required": ["languageTag"], "properties": { "languageTag": { "minLength": 1, "maxLength": 255, "type": "string" }, "channel": { "anyOf": [ { "const": "text", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "subtitle", "type": "string" }, { "const": "interface", "type": "string" } ] } } } } } ] }, "realms": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "RealmPlacementFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/RealmPlacementFilter" } }, "not": { "$ref": "#/components/schemas/RealmPlacementFilter" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "status": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "pending", "type": "string" }, { "const": "visible", "type": "string" }, { "const": "hidden", "type": "string" }, { "const": "removed", "type": "string" } ] } } } }, "publicationState": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 2, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "active", "type": "string" }, { "const": "withdrawn", "type": "string" } ] } } } } } } } } ] }, "tags": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "TagAssertionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/TagAssertionFilter" } }, "not": { "$ref": "#/components/schemas/TagAssertionFilter" }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "authority": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "view"], "properties": { "kind": { "const": "global", "type": "string" }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "effective", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "direct", "type": "string" } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "realm", "view"], "properties": { "kind": { "const": "realm", "type": "string" }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "view": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "policy", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "community", "type": "string" }, "consensus": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": [ "minimum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": [ "maximum" ], "properties": { "minimum": { "type": "integer" }, "maximum": { "type": "integer" } } } ] } } } ] } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "profile"], "properties": { "kind": { "const": "profile", "type": "string" }, "profile": { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } } } } ] } } } } } ] }, "creditAttributions": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "subjectAssociations": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] }, "publishers": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "received": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "post": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "PostFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/PostFilter" } }, "not": { "$ref": "#/components/schemas/PostFilter" }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 9, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "post", "type": "string" }, { "const": "reply", "type": "string" }, { "const": "excerpt", "type": "string" }, { "const": "review", "type": "string" }, { "const": "chapter", "type": "string" }, { "const": "page", "type": "string" }, { "const": "wiki", "type": "string" }, { "const": "picture", "type": "string" }, { "const": "governance_note", "type": "string" } ] } } } }, "subject": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "scores": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "displayed": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "$id": "ScoreFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/ScoreFilter" } }, "not": { "$ref": "#/components/schemas/ScoreFilter" }, "value": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 10, "uniqueItems": true, "type": "array", "items": { "minimum": 1, "maximum": 10, "type": "integer" } } } }, { "additionalProperties": false, "type": "object", "required": ["range"], "properties": { "range": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["minimum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["maximum"], "properties": { "minimum": { "minimum": 1, "maximum": 10, "type": "integer" }, "maximum": { "minimum": 1, "maximum": 10, "type": "integer" } } } ] } } } ] }, "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "target": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "author": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "viewer", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "id"], "properties": { "kind": { "const": "profile", "type": "string" }, "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } } } ] } } } } } ] } } }, "explainsRealmTag": { "additionalProperties": false, "type": "object", "required": ["realm"], "properties": { "realm": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } }, "tag": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "collection": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "CollectionFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/CollectionFilter" } }, "not": { "$ref": "#/components/schemas/CollectionFilter" }, "items": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["some"], "properties": { "some": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["none"], "properties": { "none": { "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "id": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } }, "kind": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 20, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "slug_namespace", "type": "string" }, { "const": "profile", "type": "string" }, { "const": "book", "type": "string" }, { "const": "software", "type": "string" }, { "const": "media", "type": "string" }, { "const": "video", "type": "string" }, { "const": "audio", "type": "string" }, { "const": "release", "type": "string" }, { "const": "entity", "type": "string" }, { "const": "label", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "series", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "zone_page", "type": "string" }, { "const": "zone_theme", "type": "string" }, { "const": "collection", "type": "string" }, { "const": "post", "type": "string" }, { "const": "poll", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm_rule", "type": "string" } ] } } } } } } } } ] } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] }, "book": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["is"], "properties": { "is": { "$id": "BookFilter", "minProperties": 1, "additionalProperties": false, "type": "object", "properties": { "all": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "any": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "#/components/schemas/BookFilter" } }, "not": { "$ref": "#/components/schemas/BookFilter" }, "releaseStatus": { "additionalProperties": false, "type": "object", "required": ["in"], "properties": { "in": { "minItems": 1, "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "anyOf": [ { "const": "ongoing", "type": "string" }, { "const": "hiatus", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "cancelled", "type": "string" } ] } } } } } } } }, { "additionalProperties": false, "type": "object", "required": ["absent"], "properties": { "absent": { "const": true, "type": "boolean" } } } ] } } }, "controls": { "maxItems": 50, "type": "array", "items": { "additionalProperties": false, "$id": "FilterDocumentControl", "type": "object", "required": ["key"], "properties": { "key": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "enabled": { "type": "boolean" }, "disclosure": { "type": "string", "enum": ["visible", "hidden"] }, "labelUnitId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "optionPolicy": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind"], "properties": { "kind": { "const": "all", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "include", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "values"], "properties": { "kind": { "const": "exclude", "type": "string" }, "values": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } } ] }, "required": { "type": "boolean" } } } } } }, "state": { "additionalProperties": false, "$id": "SharedSearchQueryState", "type": "object", "properties": { "filter": { "$ref": "#/components/schemas/UnitFilter" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] }, "pageSize": { "minimum": 1, "maximum": 100, "type": "integer" }, "expression": { "$id": "SearchControlExpression", "anyOf": [ { "additionalProperties": false, "$id": "SearchControlValue", "type": "object", "required": ["controlKey", "filter"], "properties": { "controlKey": { "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$", "type": "string" }, "filter": { "$id": "SearchControlPredicate", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "not-equals", "type": "string" }, "value": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } }, { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "lower"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "upper"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "range", "type": "string" }, "lower": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] }, "upper": { "anyOf": [ { "minLength": 1, "maxLength": 500, "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } } ] }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "anyOf": [ { "const": "category", "type": "string" }, { "const": "kind", "type": "string" }, { "const": "language", "type": "string" }, { "const": "content-rating", "type": "string" }, { "const": "ai-disclosure", "type": "string" }, { "const": "license", "type": "string" }, { "const": "tag", "type": "string" }, { "const": "credit", "type": "string" }, { "const": "credited-profile", "type": "string" }, { "const": "realm", "type": "string" }, { "const": "realm-tag-context", "type": "string" }, { "const": "zone", "type": "string" }, { "const": "subject", "type": "string" }, { "const": "target", "type": "string" }, { "const": "root", "type": "string" }, { "const": "parent", "type": "string" }, { "const": "owner", "type": "string" }, { "const": "join-policy", "type": "string" }, { "const": "multiple", "type": "string" }, { "const": "results-visibility", "type": "string" }, { "const": "closed", "type": "string" }, { "const": "created-at", "type": "string" }, { "const": "updated-at", "type": "string" }, { "const": "published-at", "type": "string" }, { "const": "closes-at", "type": "string" }, { "const": "book-isbn13", "type": "string" }, { "const": "book-publication-date", "type": "string" }, { "const": "book-page-count", "type": "string" }, { "const": "book-word-count", "type": "string" }, { "const": "book-format", "type": "string" }, { "const": "media-kind", "type": "string" }, { "const": "media-release-date", "type": "string" }, { "const": "media-runtime-minutes", "type": "string" }, { "const": "media-episode-count", "type": "string" }, { "const": "media-season-count", "type": "string" }, { "const": "software-release-date", "type": "string" }, { "const": "software-version-label", "type": "string" }, { "const": "software-platform", "type": "string" }, { "const": "software-requirement-tier", "type": "string" } ] }, "operator": { "const": "exists", "type": "string" }, "value": { "type": "boolean" } } }, { "$id": "SearchCollectionMembershipFilter", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["field", "operator", "value"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "equals", "type": "string" }, { "const": "not-equals", "type": "string" } ] }, "value": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["field", "operator", "values"], "properties": { "field": { "const": "collection", "type": "string" }, "operator": { "anyOf": [ { "const": "any-of", "type": "string" }, { "const": "all-of", "type": "string" }, { "const": "none-of", "type": "string" } ] }, "values": { "minItems": 1, "maxItems": 50, "uniqueItems": true, "type": "array", "items": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" } } } } ] }, { "additionalProperties": false, "$id": "SearchRealmTagVoteFilter", "type": "object", "required": ["field", "operator", "realmId", "tagId"], "properties": { "field": { "const": "realm-tag-vote", "type": "string" }, "operator": { "const": "matches", "type": "string" }, "realmId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "tagId": { "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", "type": "string" }, "score": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "type": "integer" }, "upper": { "type": "integer" } } } ] }, "voteCount": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["lower"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["upper"], "properties": { "lower": { "minimum": 0, "type": "integer" }, "upper": { "minimum": 0, "type": "integer" } } } ] } } } ] } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clauses"], "properties": { "operator": { "anyOf": [ { "const": "all", "type": "string" }, { "const": "any", "type": "string" } ] }, "clauses": { "minItems": 1, "maxItems": 20, "type": "array", "items": { "$ref": "SearchControlExpression" } } } }, { "additionalProperties": false, "type": "object", "required": ["operator", "clause"], "properties": { "operator": { "const": "not", "type": "string" }, "clause": { "$ref": "SearchControlExpression" } } } ] } } }, "selections": { "maxItems": 100, "type": "array", "items": { "additionalProperties": false, "$id": "SharedSearchQuerySelection", "type": "object", "required": ["field", "value", "title", "kind"], "properties": { "field": { "type": "string", "enum": [ "category", "kind", "language", "content-rating", "ai-disclosure", "license", "tag", "credit", "credited-profile", "realm", "realm-tag-context", "zone", "subject", "target", "root", "parent", "owner", "join-policy", "multiple", "results-visibility", "closed", "created-at", "updated-at", "published-at", "closes-at", "book-isbn13", "book-publication-date", "book-page-count", "book-word-count", "book-format", "media-kind", "media-release-date", "media-runtime-minutes", "media-episode-count", "media-season-count", "software-release-date", "software-version-label", "software-platform", "software-requirement-tier", "collection", "realm-tag-vote" ] }, "value": { "minLength": 1, "maxLength": 500, "type": "string" }, "title": { "minLength": 1, "maxLength": 500, "type": "string" }, "kind": { "minLength": 1, "maxLength": 100, "type": "string" } } } } } }, "createdAt": { "format": "date-time", "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SharedSearchQueryNotFound", "type": "string", "enum": ["SharedSearchQueryNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiSearchShared-queriesById", "x-rezics-quota-route-operation-id": "getApiSearchShared-queriesById", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/search/{index}": { "post": { "summary": "Search one public category", "tags": ["Search"], "parameters": [ { "name": "index", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "units", "users", "entities", "tags", "posts", "realms", "collections", "reviews", "polls" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "properties": { "query": { "maxLength": 500, "default": "", "type": "string" }, "cursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "limit": { "minimum": 1, "maximum": 50, "default": 20, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 50, "default": 20, "type": "integer" } ] }, "localizationLanguages": { "maxItems": 7, "uniqueItems": true, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "Languages": { "maxItems": 50, "type": "array", "items": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] } }, "kinds": { "maxItems": 50, "type": "array", "items": { "minLength": 1, "type": "string" } }, "contentRatings": { "maxItems": 4, "uniqueItems": true, "type": "array", "items": { "default": "general", "type": "string", "enum": ["general", "r15", "r18", "r18g"] } }, "aiDisclosures": { "maxItems": 50, "type": "array", "items": { "minLength": 1, "type": "string" } }, "licenses": { "maxItems": 50, "type": "array", "items": { "default": "cc-by-nc-sa-4.0", "type": "string", "enum": [ "cc-by-nc-sa-4.0", "cc-by-sa-4.0", "cc-by-sa-3.0", "all-rights-reserved", "cc-by-nc-4.0", "cc-by-4.0", "cc0-1.0", "pdm-1.0", "rezics-unit-content-license-v1-1" ] } }, "creditedUnitId": { "minLength": 1, "type": "string" }, "realmId": { "minLength": 1, "type": "string" }, "realmTagContextRealmId": { "format": "uuid", "type": "string" }, "subjectId": { "minLength": 1, "type": "string" }, "targetId": { "minLength": 1, "type": "string" }, "rootId": { "minLength": 1, "type": "string" }, "parentId": { "minLength": 1, "type": "string" }, "ownerId": { "minLength": 1, "type": "string" }, "joinPolicies": { "maxItems": 50, "type": "array", "items": { "minLength": 1, "type": "string" } }, "multiple": { "type": "boolean" }, "resultsVisibilities": { "maxItems": 50, "type": "array", "items": { "minLength": 1, "type": "string" } }, "closed": { "type": "boolean" }, "sort": { "type": "string", "enum": [ "best", "relevance", "createdAt:asc", "createdAt:desc", "updatedAt:asc", "updatedAt:desc", "publishedAt:asc", "publishedAt:desc", "followerCount:asc", "followerCount:desc", "replyCount:asc", "replyCount:desc", "closesAt:asc", "closesAt:desc", "title:asc", "title:desc", "progressLastSeenAt:asc", "progressLastSeenAt:desc" ] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["hits", "total", "limit", "processingTimeMs"], "properties": { "hits": { "type": "array", "items": { "type": "object", "required": [ "id", "slugAddress", "category", "kind", "language", "title", "titles", "summaries", "summary" ], "properties": { "id": { "format": "uuid", "type": "string" }, "slugAddress": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["slug", "scopeUnitId", "canonicalPath"], "properties": { "slug": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" }, "scopeUnitId": { "format": "uuid", "type": "string" }, "canonicalPath": { "minItems": 2, "maxItems": 3, "type": "array", "items": { "minLength": 1, "maxLength": 63, "pattern": "^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "type": "string" } } } }, { "type": "null" } ] }, "category": { "type": "string" }, "kind": { "type": "string" }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "titles": { "type": "array", "items": { "type": "string" } }, "summaries": { "type": "array", "items": { "type": "string" } }, "avatar": { "nullable": true, "anyOf": [ { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["type", "image"], "properties": { "type": { "const": "image", "type": "string" }, "image": { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } } } }, { "additionalProperties": false, "type": "object", "required": ["type", "emoji"], "properties": { "type": { "const": "emoji", "type": "string" }, "emoji": { "maxLength": 64, "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["type", "icon"], "properties": { "type": { "const": "icon", "type": "string" }, "icon": { "additionalProperties": false, "type": "object", "required": ["provider", "prefix", "name"], "properties": { "provider": { "const": "font-awesome", "type": "string" }, "prefix": { "type": "string", "enum": ["fas", "fab"] }, "name": { "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 128, "type": "string" } } } } } ] }, { "type": "null" } ] }, "variantRole": { "default": "standalone", "type": "string", "enum": ["standalone", "main", "variant"] }, "variantMain": { "anyOf": [ { "type": "object", "required": ["state"], "properties": { "state": { "const": "unavailable", "type": "string" } } }, { "type": "object", "required": ["state", "unit"], "properties": { "state": { "const": "available", "type": "string" }, "unit": { "additionalProperties": false, "type": "object", "required": ["id", "type", "language", "title", "cover"], "properties": { "id": { "format": "uuid", "type": "string" }, "type": { "default": "book", "type": "string", "enum": ["book", "software", "media", "entity"] }, "language": { "type": "string", "enum": ["zh", "en", "ja", "ko", "de", "fr", "es"] }, "title": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "cover": { "nullable": true, "anyOf": [ { "type": "object", "required": ["id", "url"], "properties": { "id": { "format": "uuid", "type": "string" }, "url": { "type": "string" } } }, { "type": "null" } ] } } } } } ] }, "name": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "summary": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] } } } }, "total": { "$id": "SearchCountResult", "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "exact", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } }, { "additionalProperties": false, "type": "object", "required": ["kind", "value"], "properties": { "kind": { "const": "lower-bound", "type": "string" }, "value": { "minimum": 0, "type": "integer" } } } ] }, "nextCursor": { "minLength": 1, "maxLength": 4096, "description": "Opaque continuation token returned by the preceding Search page. Clients must not inspect or modify it.", "type": "string" }, "limit": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "processingTimeMs": { "type": "number" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "InvalidSearch", "type": "string", "enum": ["InvalidSearch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } }, "503": { "description": "Response for status 503", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "SearchUnavailable", "type": "string", "enum": ["SearchUnavailable"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } } }, "operationId": "postApiSearchByIndex", "security": [{}, { "ApiToken": [] }, { "SessionCookie": [] }], "x-rezics-quota-route-operation-id": "postApiSearchByIndex", "x-rezics-quota-operation-id": "search.execute", "x-rezics-quota-cost-units": 5 } }, "/api/v1/image-assets": { "post": { "summary": "Create image asset upload", "tags": ["Image Assets"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["contentType", "size"], "properties": { "contentType": { "minLength": 1, "maxLength": 100, "type": "string" }, "size": { "minimum": 1, "maximum": 10485760, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "maximum": 10485760, "type": "integer" } ] }, "access": { "type": "string", "enum": ["private", "public"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "allOf": [ { "type": "object", "required": [ "id", "status", "access", "contentType", "size", "width", "height", "contentUrl", "presentations", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "default": "pending", "type": "string", "enum": ["pending", "ready", "failed"] }, "access": { "anyOf": [ { "const": "private", "type": "string" }, { "const": "public", "type": "string" } ] }, "contentType": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "size": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] }, "width": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "height": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "contentUrl": { "type": "string" }, "presentations": { "type": "array", "items": { "type": "object", "required": ["role", "fit", "crop", "revision", "contentUrl"], "properties": { "role": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] }, "fit": { "anyOf": [ { "const": "crop", "type": "string" }, { "const": "contain", "type": "string" } ] }, "crop": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["x", "y", "width", "height"], "properties": { "x": { "minimum": 0, "maximum": 1, "type": "number" }, "y": { "minimum": 0, "maximum": 1, "type": "number" }, "width": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" }, "height": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" } } }, { "type": "null" } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "contentUrl": { "type": "string" } } } }, "createdAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] }, "updatedAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] } } }, { "type": "object", "required": ["upload"], "properties": { "upload": { "type": "object", "required": ["url", "expiresIn", "headers"], "properties": { "url": { "type": "string" }, "expiresIn": { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, "headers": { "type": "object", "patternProperties": { "^(.*)$": { "type": "string" } } } } } } } ] } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "415": { "description": "Response for status 415", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetUnsupportedType", "type": "string", "enum": ["ImageAssetUnsupportedType"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiImage-assets", "x-rezics-quota-route-operation-id": "postApiImage-assets", "x-rezics-quota-operation-id": "image.upload", "x-rezics-quota-cost-units": 10 } }, "/api/v1/image-assets/{id}/complete": { "post": { "summary": "Complete image asset upload", "tags": ["Image Assets"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": false, "type": "object", "required": ["role"], "properties": { "role": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] } } } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "access", "contentType", "size", "width", "height", "contentUrl", "presentations", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "default": "pending", "type": "string", "enum": ["pending", "ready", "failed"] }, "access": { "type": "string", "enum": ["private", "public"] }, "contentType": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "size": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] }, "width": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "height": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "contentUrl": { "type": "string" }, "presentations": { "type": "array", "items": { "type": "object", "required": ["role", "fit", "crop", "revision", "contentUrl"], "properties": { "role": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] }, "fit": { "type": "string", "enum": ["crop", "contain"] }, "crop": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["x", "y", "width", "height"], "properties": { "x": { "minimum": 0, "maximum": 1, "type": "number" }, "y": { "minimum": 0, "maximum": 1, "type": "number" }, "width": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" }, "height": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" } } }, { "type": "null" } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "contentUrl": { "type": "string" } } } }, "createdAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] }, "updatedAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound", "ImageAssetUploadNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetInvalidState", "type": "string", "enum": ["ImageAssetInvalidState"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetInvalidSize", "type": "string", "enum": ["ImageAssetInvalidSize", "ImageAssetContentMismatch"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "postApiImage-assetsByIdComplete", "x-rezics-quota-route-operation-id": "postApiImage-assetsByIdComplete", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/image-assets/{id}/presentations/{role}": { "put": { "summary": "Update image asset presentation", "tags": ["Image Assets"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } }, { "name": "role", "in": "path", "required": true, "schema": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["fit"], "properties": { "fit": { "const": "contain", "type": "string" } } }, { "additionalProperties": false, "type": "object", "required": ["fit", "crop"], "properties": { "fit": { "const": "crop", "type": "string" }, "crop": { "additionalProperties": false, "type": "object", "required": ["x", "y", "width", "height"], "properties": { "x": { "minimum": 0, "maximum": 1, "type": "number" }, "y": { "minimum": 0, "maximum": 1, "type": "number" }, "width": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" }, "height": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" } } } } } ] } } }, "required": true }, "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": ["role", "fit", "crop", "revision", "contentUrl"], "properties": { "role": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] }, "fit": { "type": "string", "enum": ["crop", "contain"] }, "crop": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["x", "y", "width", "height"], "properties": { "x": { "minimum": 0, "maximum": 1, "type": "number" }, "y": { "minimum": 0, "maximum": 1, "type": "number" }, "width": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" }, "height": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" } } }, { "type": "null" } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "contentUrl": { "type": "string" } } } } } }, "400": { "description": "Request body could not be parsed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MalformedRequestBody" } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetInvalidState", "type": "string", "enum": ["ImageAssetInvalidState"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Response for status 422", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetInvalidPresentation", "type": "string", "enum": ["ImageAssetInvalidPresentation"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } }, { "$ref": "#/components/schemas/ValidationError" } ] } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "putApiImage-assetsByIdPresentationsByRole", "x-rezics-quota-route-operation-id": "putApiImage-assetsByIdPresentationsByRole", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } }, "/api/v1/image-assets/{id}": { "get": { "summary": "Get image asset", "tags": ["Image Assets"], "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Response for status 200", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "status", "access", "contentType", "size", "width", "height", "contentUrl", "presentations", "createdAt", "updatedAt" ], "properties": { "id": { "format": "uuid", "type": "string" }, "status": { "default": "pending", "type": "string", "enum": ["pending", "ready", "failed"] }, "access": { "type": "string", "enum": ["private", "public"] }, "contentType": { "nullable": true, "anyOf": [{ "type": "string" }, { "type": "null" }] }, "size": { "nullable": true, "anyOf": [ { "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "type": "integer" } ] }, { "type": "null" } ] }, "width": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "height": { "nullable": true, "anyOf": [ { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, { "type": "null" } ] }, "contentUrl": { "type": "string" }, "presentations": { "type": "array", "items": { "type": "object", "required": ["role", "fit", "crop", "revision", "contentUrl"], "properties": { "role": { "default": "avatar", "type": "string", "enum": ["avatar", "banner", "cover"] }, "fit": { "type": "string", "enum": ["crop", "contain"] }, "crop": { "nullable": true, "anyOf": [ { "additionalProperties": false, "type": "object", "required": ["x", "y", "width", "height"], "properties": { "x": { "minimum": 0, "maximum": 1, "type": "number" }, "y": { "minimum": 0, "maximum": 1, "type": "number" }, "width": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" }, "height": { "exclusiveMinimum": 0, "maximum": 1, "type": "number" } } }, { "type": "null" } ] }, "revision": { "minimum": 1, "anyOf": [ { "format": "integer", "default": 0, "type": "string" }, { "minimum": 1, "type": "integer" } ] }, "contentUrl": { "type": "string" } } } }, "createdAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] }, "updatedAt": { "anyOf": [ { "type": "Date" }, { "format": "date-time", "type": "string" }, { "format": "date", "type": "string" }, { "type": "number" } ] } } } } } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "operationId": "getApiImage-assetsById", "x-rezics-quota-route-operation-id": "getApiImage-assetsById", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 }, "delete": { "summary": "Delete incomplete image asset", "tags": ["Image Assets"], "responses": { "204": { "description": "Response for status 204", "content": { "type": "void" } }, "401": { "description": "Response for status 401", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "AuthenticationRequired", "type": "string", "enum": ["AuthenticationRequired"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "404": { "description": "Response for status 404", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetNotFound", "type": "string", "enum": ["ImageAssetNotFound"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "409": { "description": "Response for status 409", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "default": "ImageAssetInUse", "type": "string", "enum": ["ImageAssetInUse"] }, "message": { "type": "string" }, "details": {} } }, "requestId": { "type": "string" } } } } } }, "422": { "description": "Request validation failed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationError" } } } }, "429": { "description": "API quota exceeded", "headers": { "Retry-After": { "description": "Seconds until this request can be retried", "schema": { "type": "integer", "minimum": 1 } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "requestId"], "properties": { "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "enum": ["ApiQuotaExceeded", "ApiTokenRateLimitExceeded"] }, "message": { "type": "string" }, "details": { "$ref": "#/components/schemas/JsonValue" } } }, "requestId": { "type": "string" } } } } } }, "500": { "description": "Unexpected internal failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InternalError" } } } } }, "security": [{ "ApiToken": [] }, { "SessionCookie": [] }], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "format": "uuid", "type": "string" } } ], "operationId": "deleteApiImage-assetsById", "x-rezics-quota-route-operation-id": "deleteApiImage-assetsById", "x-rezics-quota-operation-id": "*", "x-rezics-quota-cost-units": 1 } } } }