Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion apps/docs/public/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,25 @@ components:
- unknown
example: client_and_server
description: 'The environment a project or version supports. For an explanation of each environment, see the blog post here: https://modrinth.com/news/article/new-environments/#new-system'
DisclosureTypeEnum:
type: string
enum:
- ai_content
- ai_content_code
- ai_content_assets
- ai_content_text
- ai_content_functionality
- advertisements
- epilepsy_triggers
- system_interactions
- telemetry
- telemetry_opt_in
- telemetry_opt_out
- telemetry_always_active
- derivative_work
- paid_features
- archived
example: ai_content_code
EnvironmentInputEnum:
type: string
enum:
Expand Down Expand Up @@ -727,6 +746,12 @@ components:
$ref: '#/components/schemas/EnvironmentEnum'
description: 'All the environments that versions of this project support. Not in any particular order, we recommend using the environment information on a version instead. For an explanation of each environment, see the blog post here: https://modrinth.com/news/article/new-environments/#new-system'
example: [client_and_server]
disclosure_types:
type: array
items:
$ref: '#/components/schemas/DisclosureTypeEnum'
description: Disclosures listed on the project.
example: [ai_content, ai_content_code, advertisements]
gallery:
type: array
description: A list of images that have been uploaded to the project's gallery
Expand Down Expand Up @@ -796,6 +821,7 @@ components:
- latest_version
- license
- environment
- disclosure_types
- gallery
- client_side
- server_side
Expand Down Expand Up @@ -2160,7 +2186,33 @@ paths:
- `categories` (loaders are lumped in with categories in search)
- `versions`
- `open_source`
- `environment`
- `environment` (one of the following values)
- `client_and_server`
- `client_only`
- `client_only_server_optional`
- `singleplayer_only`
- `server_only`
- `server_only_client_optional`
- `dedicated_server_only`
- `client_or_server`
- `client_or_server_prefers_both`
- `unknown`
- `disclosure_types` (list of any of the following values)
- `ai_content`
- `ai_content_code`
- `ai_content_assets`
- `ai_content_text`
- `ai_content_functionality`
- `advertisements`
- `epilepsy_triggers`
- `system_interactions`
- `telemetry`
- `telemetry_opt_in`
- `telemetry_opt_out`
- `telemetry_always_active`
- `derivative_work`
- `paid_features`
- `archived`
- `client_side` (deprecated - use `environment` instead)
- `server_side` (deprecated - use `environment` instead)

Expand Down
2 changes: 2 additions & 0 deletions apps/labrinth/src/models/v2/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct LegacyResultSearchProject {
pub client_side: String,
pub server_side: String,
pub environment: Vec<String>,
pub disclosure_types: Vec<String>,
pub gallery: Vec<String>,
pub featured_gallery: Option<String>,
pub color: Option<u32>,
Expand Down Expand Up @@ -151,6 +152,7 @@ impl LegacyResultSearchProject {
client_side,
server_side,
environment: environments,
disclosure_types: result_search_project.disclosure_types,
versions,
latest_version: result_search_project
.version_id
Expand Down
2 changes: 2 additions & 0 deletions packages/api-client/src/modules/labrinth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,7 @@ export namespace Labrinth {
license: string
client_side: string
server_side: string
disclosure_types: string[]
gallery: string[]
featured_gallery: string | null
color: number | null
Expand Down Expand Up @@ -1929,6 +1930,7 @@ export namespace Labrinth {
minecraft_java_server?: Projects.v3.MinecraftJavaServer | null
minecraft_bedrock_server?: Projects.v3.MinecraftBedrockServer | null
minecraft_mod?: unknown | null
disclosure_types: string[]
}

export interface SearchResults {
Expand Down
Loading