Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

feat(openapi): validate Dart SDK generation, make the spec self-sufficient (#1181)

Hampus6e87f6e3d148
diff --git a/.github/workflows/dart-sdk-validation.yml b/.github/workflows/dart-sdk-validation.yml
new file mode 100644
index 000000000..a5cad1923
--- /dev/null
+++ b/.github/workflows/dart-sdk-validation.yml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+name: Dart SDK Validation
+
+on:
+ pull_request:
+
+permissions:
+ contents: read
+ pull-requests: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check changed files
+ id: changes
+ env:
+ GH_TOKEN: ${{ github.token }}
+ PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
+ run: |
+ changed_files="$(mktemp)"
+ gh pr diff "$PULL_REQUEST_NUMBER" --repo "$GITHUB_REPOSITORY" --name-only > "$changed_files"
+ if grep -Fxq 'fluxer_api/src/api/openapi/openapi.json' "$changed_files"; then
+ echo "openapi=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "openapi=false" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Check out fluxer
+ if: steps.changes.outputs.openapi == 'true'
+ uses: actions/checkout@b9e0990d219a03df7633c93f6f005a8fecbcab22
+ with:
+ persist-credentials: false
+
+ - name: Checkout Dart SDK
+ if: steps.changes.outputs.openapi == 'true'
+ uses: actions/checkout@b9e0990d219a03df7633c93f6f005a8fecbcab22
+ with:
+ repository: fluxerapp/dart_sdk
+ ref: canary
+ path: dart_sdk
+ persist-credentials: false
+
+ - name: Setup Dart
+ if: steps.changes.outputs.openapi == 'true'
+ uses: dart-lang/setup-dart@2bd11704788983a6a210731656d0042e2df8b2c1
+ with:
+ sdk: stable
+
+ - name: Validate Dart SDK generation
+ if: steps.changes.outputs.openapi == 'true'
+ working-directory: dart_sdk
+ run: |
+ chmod +x scripts/validate_upstream_spec.sh
+ ./scripts/validate_upstream_spec.sh "file://${GITHUB_WORKSPACE}/fluxer_api/src/api/openapi/openapi.json"
diff --git a/fluxer_admin/openapi-admin.json b/fluxer_admin/openapi-admin.json
index e2ba12529..cfbe0c39f 100644
--- a/fluxer_admin/openapi-admin.json
+++ b/fluxer_admin/openapi-admin.json
@@ -14222,8 +14222,7 @@
"me": {
"description": "Whether the current user has reacted with this emoji",
"nullable": true,
- "type": "boolean",
- "enum": [true]
+ "type": "boolean"
}
},
"required": ["emoji", "count"]
diff --git a/fluxer_api/src/api/openapi/openapi.json b/fluxer_api/src/api/openapi/openapi.json
index b5be26778..7fee1ae2c 100644
--- a/fluxer_api/src/api/openapi/openapi.json
+++ b/fluxer_api/src/api/openapi/openapi.json
@@ -27223,7 +27223,7 @@
"description": "The total number of times this reaction has been used"
},
"me": {
- "anyOf": [{"type": "boolean", "enum": [true]}, {"type": "null"}],
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
"description": "Whether the current user has reacted with this emoji"
}
},
@@ -27480,378 +27480,383 @@
},
"ChannelUpdateRequest": {
"oneOf": [
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ {"$ref": "#/components/schemas/GuildTextChannelUpdateRequest"},
+ {"$ref": "#/components/schemas/GuildVoiceChannelUpdateRequest"},
+ {"$ref": "#/components/schemas/GuildCategoryChannelUpdateRequest"},
+ {"$ref": "#/components/schemas/GuildLinkChannelUpdateRequest"},
+ {"$ref": "#/components/schemas/GroupDmChannelUpdateRequest"}
+ ]
+ },
+ "GuildTextChannelUpdateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "rate_limit_per_user": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
- "description": "Slowmode delay in seconds (0-21600)"
- },
- "icon": {
- "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
- "description": "Base64-encoded icon image for group DM channels"
- },
- "owner_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the new owner for group DM channels"
- },
- "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
- "rtc_region": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "Voice region ID for the voice channel (1-64 characters)"
- },
- "type": {
- "type": "integer",
- "enum": [0],
- "x-enumNames": ["GUILD_TEXT"],
- "x-enumDescriptions": ["Channel type (text channel)"]
- },
- "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ "nsfw": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
+ },
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "rate_limit_per_user": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
+ "description": "Slowmode delay in seconds (0-21600)"
+ },
+ "icon": {
+ "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
+ "description": "Base64-encoded icon image for group DM channels"
+ },
+ "owner_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the new owner for group DM channels"
+ },
+ "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
+ "rtc_region": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "Voice region ID for the voice channel (1-64 characters)"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [0],
+ "x-enumNames": ["GUILD_TEXT"],
+ "x-enumDescriptions": ["Channel type (text channel)"]
+ },
+ "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ },
+ "required": ["type"]
+ },
+ "UnsignedInt64Type": {"type": "string", "format": "int64", "pattern": "^[0-9]+$"},
+ "Base64ImageType": {"type": "string", "format": "byte", "description": "Base64-encoded image data"},
+ "ChannelNicknameOverrides": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [{"type": "string"}, {"type": "null"}],
+ "description": "Nickname or null to clear"
+ },
+ "description": "User nickname overrides (user ID to nickname mapping)"
+ },
+ "GuildVoiceChannelUpdateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
- },
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "rate_limit_per_user": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
- "description": "Slowmode delay in seconds (0-21600)"
- },
- "icon": {
- "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
- "description": "Base64-encoded icon image for group DM channels"
- },
- "owner_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the new owner for group DM channels"
- },
- "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
- "rtc_region": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "Voice region ID for the voice channel (1-64 characters)"
- },
- "type": {
- "type": "integer",
- "enum": [2],
- "x-enumNames": ["GUILD_VOICE"],
- "x-enumDescriptions": ["Channel type (voice channel)"]
- },
- "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ "nsfw": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
+ },
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "rate_limit_per_user": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
+ "description": "Slowmode delay in seconds (0-21600)"
+ },
+ "icon": {
+ "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
+ "description": "Base64-encoded icon image for group DM channels"
+ },
+ "owner_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the new owner for group DM channels"
+ },
+ "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
+ "rtc_region": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "Voice region ID for the voice channel (1-64 characters)"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [2],
+ "x-enumNames": ["GUILD_VOICE"],
+ "x-enumDescriptions": ["Channel type (voice channel)"]
+ },
+ "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ },
+ "required": ["type"]
+ },
+ "GuildCategoryChannelUpdateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
- },
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "rate_limit_per_user": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
- "description": "Slowmode delay in seconds (0-21600)"
- },
- "icon": {
- "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
- "description": "Base64-encoded icon image for group DM channels"
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "owner_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the new owner for group DM channels"
- },
- "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
- "rtc_region": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "Voice region ID for the voice channel (1-64 characters)"
- },
- "type": {
- "type": "integer",
- "enum": [4],
- "x-enumNames": ["GUILD_CATEGORY"],
- "x-enumDescriptions": ["Channel type (category)"]
- },
- "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the category"}
+ "required": ["id", "type"]
},
- "required": ["type"]
+ "description": "Permission overwrites for roles and members"
+ },
+ "nsfw": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
+ },
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "rate_limit_per_user": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
+ "description": "Slowmode delay in seconds (0-21600)"
+ },
+ "icon": {
+ "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
+ "description": "Base64-encoded icon image for group DM channels"
+ },
+ "owner_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the new owner for group DM channels"
+ },
+ "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
+ "rtc_region": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "Voice region ID for the voice channel (1-64 characters)"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [4],
+ "x-enumNames": ["GUILD_CATEGORY"],
+ "x-enumDescriptions": ["Channel type (category)"]
+ },
+ "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the category"}
+ },
+ "required": ["type"]
+ },
+ "GuildLinkChannelUpdateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
- },
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "rate_limit_per_user": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
- "description": "Slowmode delay in seconds (0-21600)"
- },
- "icon": {
- "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
- "description": "Base64-encoded icon image for group DM channels"
- },
- "owner_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the new owner for group DM channels"
- },
- "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
- "rtc_region": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "Voice region ID for the voice channel (1-64 characters)"
- },
- "type": {
- "type": "integer",
- "enum": [998],
- "x-enumNames": ["GUILD_LINK"],
- "x-enumDescriptions": ["Channel type (link channel)"]
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "integer",
- "enum": [3],
- "x-enumNames": ["GROUP_DM"],
- "x-enumDescriptions": ["Channel type (group DM)"]
- },
- "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the group DM"},
- "icon": {
- "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
- "description": "Base64-encoded icon image for the group DM"
- },
- "owner_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the new owner of the group DM"
- },
- "nicks": {
- "anyOf": [{"$ref": "#/components/schemas/ChannelNicknameOverrides"}, {"type": "null"}],
- "description": "Custom nicknames for users in this group DM"
- }
- },
- "required": ["type"]
- }
- ]
+ "nsfw": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Legacy: setting true maps to nsfw_override=true; setting false maps to nsfw_override=null (inherit). Prefer nsfw_override."
+ },
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "rate_limit_per_user": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 21600, "format": "int32"}, {"type": "null"}],
+ "description": "Slowmode delay in seconds (0-21600)"
+ },
+ "icon": {
+ "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
+ "description": "Base64-encoded icon image for group DM channels"
+ },
+ "owner_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the new owner for group DM channels"
+ },
+ "nicks": {"$ref": "#/components/schemas/ChannelNicknameOverrides"},
+ "rtc_region": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "Voice region ID for the voice channel (1-64 characters)"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [998],
+ "x-enumNames": ["GUILD_LINK"],
+ "x-enumDescriptions": ["Channel type (link channel)"]
+ },
+ "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the channel"}
+ },
+ "required": ["type"]
},
- "UnsignedInt64Type": {"type": "string", "format": "int64", "pattern": "^[0-9]+$"},
- "Base64ImageType": {"type": "string", "format": "byte", "description": "Base64-encoded image data"},
- "ChannelNicknameOverrides": {
+ "GroupDmChannelUpdateRequest": {
"type": "object",
- "additionalProperties": {
- "oneOf": [{"type": "string"}, {"type": "null"}],
- "description": "Nickname or null to clear"
+ "properties": {
+ "type": {
+ "type": "integer",
+ "enum": [3],
+ "x-enumNames": ["GROUP_DM"],
+ "x-enumDescriptions": ["Channel type (group DM)"]
+ },
+ "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The name of the group DM"},
+ "icon": {
+ "anyOf": [{"$ref": "#/components/schemas/Base64ImageType"}, {"type": "null"}],
+ "description": "Base64-encoded icon image for the group DM"
+ },
+ "owner_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the new owner of the group DM"
+ },
+ "nicks": {
+ "anyOf": [{"$ref": "#/components/schemas/ChannelNicknameOverrides"}, {"type": "null"}],
+ "description": "Custom nicknames for users in this group DM"
+ }
},
- "description": "User nickname overrides (user ID to nickname mapping)"
+ "required": ["type"]
},
"SudoVerificationSchema": {
"type": "object",
@@ -27885,69 +27890,71 @@
},
"PresignedAttachmentUploadResponseItem": {
"oneOf": [
- {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/Int32Type"},
- "filename": {"type": "string", "description": "The original filename for this upload"},
- "upload_filename": {
- "type": "string",
- "description": "Temporary upload key to reference in message send payloads"
- },
- "file_size": {"$ref": "#/components/schemas/Int32Type"},
- "content_type": {"type": "string", "description": "Expected MIME type for this upload"},
- "upload_mode": {"type": "string", "enum": ["singlepart"]},
- "upload_url": {
- "type": "string",
- "description": "Presigned URL used to upload this attachment with a single PUT"
- }
- },
- "required": ["id", "filename", "upload_filename", "file_size", "content_type", "upload_mode", "upload_url"]
+ {"$ref": "#/components/schemas/SinglepartPresignedAttachmentUploadResponseItem"},
+ {"$ref": "#/components/schemas/MultipartPresignedAttachmentUploadResponseItem"}
+ ]
+ },
+ "SinglepartPresignedAttachmentUploadResponseItem": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/Int32Type"},
+ "filename": {"type": "string", "description": "The original filename for this upload"},
+ "upload_filename": {
+ "type": "string",
+ "description": "Temporary upload key to reference in message send payloads"
},
- {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/Int32Type"},
- "filename": {"type": "string", "description": "The original filename for this upload"},
- "upload_filename": {
- "type": "string",
- "description": "Temporary upload key to reference in message send payloads"
- },
- "file_size": {"$ref": "#/components/schemas/Int32Type"},
- "content_type": {"type": "string", "description": "Expected MIME type for this upload"},
- "upload_mode": {"type": "string", "enum": ["multipart"]},
- "upload_id": {
- "type": "string",
- "description": "S3 multipart upload identifier; required to complete the upload"
+ "file_size": {"$ref": "#/components/schemas/Int32Type"},
+ "content_type": {"type": "string", "description": "Expected MIME type for this upload"},
+ "upload_mode": {"type": "string", "enum": ["singlepart"]},
+ "upload_url": {
+ "type": "string",
+ "description": "Presigned URL used to upload this attachment with a single PUT"
+ }
+ },
+ "required": ["id", "filename", "upload_filename", "file_size", "content_type", "upload_mode", "upload_url"]
+ },
+ "MultipartPresignedAttachmentUploadResponseItem": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/Int32Type"},
+ "filename": {"type": "string", "description": "The original filename for this upload"},
+ "upload_filename": {
+ "type": "string",
+ "description": "Temporary upload key to reference in message send payloads"
+ },
+ "file_size": {"$ref": "#/components/schemas/Int32Type"},
+ "content_type": {"type": "string", "description": "Expected MIME type for this upload"},
+ "upload_mode": {"type": "string", "enum": ["multipart"]},
+ "upload_id": {
+ "type": "string",
+ "description": "S3 multipart upload identifier; required to complete the upload"
+ },
+ "part_size": {"$ref": "#/components/schemas/Int32Type"},
+ "parts": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "part_number": {"$ref": "#/components/schemas/Int32Type"},
+ "upload_url": {"type": "string", "description": "Presigned URL used to upload this part"}
},
- "part_size": {"$ref": "#/components/schemas/Int32Type"},
- "parts": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "part_number": {"$ref": "#/components/schemas/Int32Type"},
- "upload_url": {"type": "string", "description": "Presigned URL used to upload this part"}
- },
- "required": ["part_number", "upload_url"]
- },
- "minItems": 1,
- "maxItems": 10000,
- "description": "Per-part presigned URLs for parallel upload"
- }
+ "required": ["part_number", "upload_url"]
},
- "required": [
- "id",
- "filename",
- "upload_filename",
- "file_size",
- "content_type",
- "upload_mode",
- "upload_id",
- "part_size",
- "parts"
- ]
+ "minItems": 1,
+ "maxItems": 10000,
+ "description": "Per-part presigned URLs for parallel upload"
}
+ },
+ "required": [
+ "id",
+ "filename",
+ "upload_filename",
+ "file_size",
+ "content_type",
+ "upload_mode",
+ "upload_id",
+ "part_size",
+ "parts"
]
},
"PresignedAttachmentUploadRequest": {
@@ -30682,263 +30689,267 @@
},
"ChannelCreateRequest": {
"oneOf": [
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ {"$ref": "#/components/schemas/GuildTextChannelCreateRequest"},
+ {"$ref": "#/components/schemas/GuildVoiceChannelCreateRequest"},
+ {"$ref": "#/components/schemas/GuildCategoryChannelCreateRequest"},
+ {"$ref": "#/components/schemas/GuildLinkChannelCreateRequest"}
+ ]
+ },
+ "GuildTextChannelCreateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "type": {
- "type": "integer",
- "enum": [0],
- "x-enumNames": ["GUILD_TEXT"],
- "x-enumDescriptions": ["Channel type (text channel)"]
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "name": {"type": "string", "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type", "name"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
- },
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "type": {
- "type": "integer",
- "enum": [2],
- "x-enumNames": ["GUILD_VOICE"],
- "x-enumDescriptions": ["Channel type (voice channel)"]
+ "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [0],
+ "x-enumNames": ["GUILD_TEXT"],
+ "x-enumDescriptions": ["Channel type (text channel)"]
+ },
+ "name": {"type": "string", "description": "The name of the channel"}
+ },
+ "required": ["type", "name"]
+ },
+ "GuildVoiceChannelCreateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
+ },
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "name": {"type": "string", "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type", "name"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [2],
+ "x-enumNames": ["GUILD_VOICE"],
+ "x-enumDescriptions": ["Channel type (voice channel)"]
+ },
+ "name": {"type": "string", "description": "The name of the channel"}
+ },
+ "required": ["type", "name"]
+ },
+ "GuildCategoryChannelCreateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
- },
- "type": {
- "type": "integer",
- "enum": [4],
- "x-enumNames": ["GUILD_CATEGORY"],
- "x-enumDescriptions": ["Channel type (category)"]
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "name": {"type": "string", "description": "The name of the category"}
+ "required": ["id", "type"]
},
- "required": ["type", "name"]
+ "description": "Permission overwrites for roles and members"
},
- {
- "type": "object",
- "properties": {
- "topic": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The channel topic (1-1024 characters)"
- },
- "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
- "parent_id": {
- "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
- "description": "ID of the parent category for this channel"
- },
- "bitrate": {
- "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
- "description": "Voice channel bitrate in bits per second (8000-320000)"
- },
- "user_limit": {
- "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
- "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
- },
- "voice_connection_limit": {
- "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
- "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {"$ref": "#/components/schemas/SnowflakeType"},
- "type": {
- "type": "integer",
- "enum": [0, 1],
- "x-enumNames": ["ROLE", "MEMBER"],
- "x-enumDescriptions": [null, null],
- "description": "The type of overwrite (0 = role, 1 = member)"
- },
- "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
- "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
- },
- "required": ["id", "type"]
+ "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [4],
+ "x-enumNames": ["GUILD_CATEGORY"],
+ "x-enumDescriptions": ["Channel type (category)"]
+ },
+ "name": {"type": "string", "description": "The name of the category"}
+ },
+ "required": ["type", "name"]
+ },
+ "GuildLinkChannelCreateRequest": {
+ "type": "object",
+ "properties": {
+ "topic": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The channel topic (1-1024 characters)"
+ },
+ "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "External URL for link channels"},
+ "parent_id": {
+ "anyOf": [{"$ref": "#/components/schemas/SnowflakeType"}, {"type": "null"}],
+ "description": "ID of the parent category for this channel"
+ },
+ "bitrate": {
+ "anyOf": [{"type": "integer", "minimum": 8000, "maximum": 320000, "format": "int32"}, {"type": "null"}],
+ "description": "Voice channel bitrate in bits per second (8000-320000)"
+ },
+ "user_limit": {
+ "anyOf": [{"type": "integer", "minimum": 0, "maximum": 99, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum users allowed in voice channel (0-99, 0 means unlimited)"
+ },
+ "voice_connection_limit": {
+ "anyOf": [{"type": "integer", "minimum": 1, "maximum": 100, "format": "int32"}, {"type": "null"}],
+ "description": "Maximum active voice connections allowed per user in a voice channel (1-100)"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "type": {
+ "type": "integer",
+ "enum": [0, 1],
+ "x-enumNames": ["ROLE", "MEMBER"],
+ "x-enumDescriptions": [null, null],
+ "description": "The type of overwrite (0 = role, 1 = member)"
},
- "description": "Permission overwrites for roles and members"
- },
- "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
- "nsfw_override": {
- "anyOf": [{"type": "boolean"}, {"type": "null"}],
- "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
- },
- "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
- "content_warning_text": {
- "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
- "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ "allow": {"$ref": "#/components/schemas/UnsignedInt64Type"},
+ "deny": {"$ref": "#/components/schemas/UnsignedInt64Type"}
},
- "type": {
- "type": "integer",
- "enum": [998],
- "x-enumNames": ["GUILD_LINK"],
- "x-enumDescriptions": ["Channel type (link channel)"]
- },
- "name": {"type": "string", "description": "The name of the channel"}
+ "required": ["id", "type"]
},
- "required": ["type", "name"]
- }
- ]
+ "description": "Permission overwrites for roles and members"
+ },
+ "nsfw": {"type": "boolean", "description": "Whether the channel is marked as NSFW"},
+ "nsfw_override": {
+ "anyOf": [{"type": "boolean"}, {"type": "null"}],
+ "description": "Per-channel adult-content override (true=on, false=off, null=inherit from category then guild). Takes precedence over the legacy `nsfw` field if both are present."
+ },
+ "content_warning_level": {"$ref": "#/components/schemas/ContentWarningLevel"},
+ "content_warning_text": {
+ "anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}],
+ "description": "Custom channel content warning text (max 200 characters); null inherits from parent or guild"
+ },
+ "type": {
+ "type": "integer",
+ "enum": [998],
+ "x-enumNames": ["GUILD_LINK"],
+ "x-enumDescriptions": ["Channel type (link channel)"]
+ },
+ "name": {"type": "string", "description": "The name of the channel"}
+ },
+ "required": ["type", "name"]
},
"ChannelPositionUpdateRequest": {
"type": "array",
@@ -32324,41 +32335,40 @@
},
"TokenRequest": {
"oneOf": [
- {
- "type": "object",
- "properties": {
- "grant_type": {
- "type": "string",
- "enum": ["authorization_code"],
- "description": "The grant type for exchanging an authorization code"
- },
- "code": {"type": "string", "description": "The authorization code received from the authorize endpoint"},
- "redirect_uri": {"type": "string", "description": "The redirect URI used in the authorization request"},
- "client_id": {"$ref": "#/components/schemas/SnowflakeType"},
- "client_secret": {"type": "string", "description": "The application client secret"},
- "code_verifier": {"type": "string", "description": "The PKCE code verifier for the authorization request"}
- },
- "required": ["grant_type", "code", "redirect_uri"]
- },
- {
- "type": "object",
- "properties": {
- "grant_type": {
- "type": "string",
- "enum": ["refresh_token"],
- "description": "The grant type for refreshing an access token"
- },
- "refresh_token": {
- "type": "string",
- "description": "The refresh token to exchange for a new access token"
- },
- "client_id": {"$ref": "#/components/schemas/SnowflakeType"},
- "client_secret": {"type": "string", "description": "The application client secret"}
- },
- "required": ["grant_type", "refresh_token"]
- }
+ {"$ref": "#/components/schemas/AuthorizationCodeTokenRequest"},
+ {"$ref": "#/components/schemas/RefreshTokenTokenRequest"}
]
},
+ "AuthorizationCodeTokenRequest": {
+ "type": "object",
+ "properties": {
+ "grant_type": {
+ "type": "string",
+ "enum": ["authorization_code"],
+ "description": "The grant type for exchanging an authorization code"
+ },
+ "code": {"type": "string", "description": "The authorization code received from the authorize endpoint"},
+ "redirect_uri": {"type": "string", "description": "The redirect URI used in the authorization request"},
+ "client_id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "client_secret": {"type": "string", "description": "The application client secret"},
+ "code_verifier": {"type": "string", "description": "The PKCE code verifier for the authorization request"}
+ },
+ "required": ["grant_type", "code", "redirect_uri"]
+ },
+ "RefreshTokenTokenRequest": {
+ "type": "object",
+ "properties": {
+ "grant_type": {
+ "type": "string",
+ "enum": ["refresh_token"],
+ "description": "The grant type for refreshing an access token"
+ },
+ "refresh_token": {"type": "string", "description": "The refresh token to exchange for a new access token"},
+ "client_id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "client_secret": {"type": "string", "description": "The application client secret"}
+ },
+ "required": ["grant_type", "refresh_token"]
+ },
"RevokeRequestForm": {
"type": "object",
"properties": {
@@ -32765,8 +32775,12 @@
"type": "object",
"properties": {
"stripe_customer_id": {"anyOf": [{"type": "string"}, {"type": "null"}]},
- "current_subscription_price": {"$ref": "#/components/schemas/CurrentSubscriptionPriceResponse"},
- "pending_subscription_change": {"$ref": "#/components/schemas/PendingSubscriptionChangeResponse"},
+ "current_subscription_price": {
+ "anyOf": [{"$ref": "#/components/schemas/CurrentSubscriptionPriceResponse"}, {"type": "null"}]
+ },
+ "pending_subscription_change": {
+ "anyOf": [{"$ref": "#/components/schemas/PendingSubscriptionChangeResponse"}, {"type": "null"}]
+ },
"subscription": {
"anyOf": [{"$ref": "#/components/schemas/PremiumBillingSubscriptionResponse"}, {"type": "null"}]
},
@@ -33175,347 +33189,344 @@
},
"required": ["read_states"]
},
- "ReadStateAckBulkRequest": {
+ "ReadStateAckBulkRequest": {
+ "type": "object",
+ "properties": {
+ "read_states": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "message_id": {"$ref": "#/components/schemas/SnowflakeType"}
+ },
+ "required": ["channel_id", "message_id"]
+ },
+ "minItems": 1,
+ "maxItems": 100,
+ "description": "Array of channel/message pairs to acknowledge"
+ }
+ },
+ "required": ["read_states"]
+ },
+ "ReportResponse": {
+ "type": "object",
+ "properties": {
+ "report_id": {
+ "type": "string",
+ "pattern": "^(0|[1-9][0-9]*)$",
+ "description": "The unique identifier for this report"
+ },
+ "status": {"type": "string", "description": "Current status of the report (pending, reviewed, resolved)"},
+ "reported_at": {"type": "string", "description": "ISO 8601 timestamp when the report was submitted"}
+ },
+ "required": ["report_id", "status", "reported_at"]
+ },
+ "DsaReportRequest": {
+ "oneOf": [
+ {"$ref": "#/components/schemas/MessageDsaReportRequest"},
+ {"$ref": "#/components/schemas/UserDsaReportRequest"},
+ {"$ref": "#/components/schemas/GuildDsaReportRequest"}
+ ]
+ },
+ "MessageDsaReportRequest": {
+ "type": "object",
+ "properties": {
+ "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
+ "additional_info": {"type": "string", "description": "Additional context or details about the report"},
+ "reporter_full_legal_name": {
+ "type": "string",
+ "description": "Full legal name of the person filing the report"
+ },
+ "reporter_country_of_residence": {
+ "type": "string",
+ "enum": [
+ "AT",
+ "BE",
+ "BG",
+ "HR",
+ "CY",
+ "CZ",
+ "DK",
+ "EE",
+ "FI",
+ "FR",
+ "DE",
+ "GR",
+ "HU",
+ "IE",
+ "IT",
+ "LV",
+ "LT",
+ "LU",
+ "MT",
+ "NL",
+ "PL",
+ "PT",
+ "RO",
+ "SK",
+ "SI",
+ "ES",
+ "SE"
+ ],
+ "description": "EU country code of the reporter residence"
+ },
+ "reporter_fluxer_tag": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 37,
+ "description": "Fluxer tag of the reporter if they have an account"
+ },
+ "report_type": {"type": "string", "enum": ["message"], "description": "Type of report"},
+ "category": {
+ "type": "string",
+ "enum": [
+ "harassment",
+ "hate_speech",
+ "violent_content",
+ "spam",
+ "nsfw_violation",
+ "illegal_activity",
+ "doxxing",
+ "self_harm",
+ "child_safety",
+ "malicious_links",
+ "impersonation",
+ "other"
+ ],
+ "x-enumNames": [
+ "harassment",
+ "hate_speech",
+ "violent_content",
+ "spam",
+ "nsfw_violation",
+ "illegal_activity",
+ "doxxing",
+ "self_harm",
+ "child_safety",
+ "malicious_links",
+ "impersonation",
+ "other"
+ ],
+ "x-enumDescriptions": [
+ "Content that harasses, bullies, or intimidates users",
+ "Content promoting hatred against protected groups",
+ "Content depicting or promoting violence",
+ "Unsolicited bulk messages or promotional content",
+ "Adult content posted outside age-restricted channels",
+ "Content promoting or facilitating illegal activities",
+ "Content revealing private personal information",
+ "Content promoting self-harm or suicide",
+ "Content that endangers minors or depicts child abuse",
+ "Links to malware, phishing, or other malicious sites",
+ "Content falsely claiming to be another person or entity",
+ "Other violations not covered by specific categories"
+ ],
+ "description": "Category of the message report"
+ },
+ "message_link": {"type": "string", "description": "Link to the message being reported"},
+ "reported_user_tag": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 37,
+ "description": "Fluxer tag of the user who sent the message"
+ }
+ },
+ "required": [
+ "ticket",
+ "reporter_full_legal_name",
+ "reporter_country_of_residence",
+ "report_type",
+ "category",
+ "message_link"
+ ]
+ },
+ "UserDsaReportRequest": {
"type": "object",
"properties": {
- "read_states": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {"$ref": "#/components/schemas/SnowflakeType"},
- "message_id": {"$ref": "#/components/schemas/SnowflakeType"}
- },
- "required": ["channel_id", "message_id"]
- },
- "minItems": 1,
- "maxItems": 100,
- "description": "Array of channel/message pairs to acknowledge"
+ "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
+ "additional_info": {"type": "string", "description": "Additional context or details about the report"},
+ "reporter_full_legal_name": {
+ "type": "string",
+ "description": "Full legal name of the person filing the report"
+ },
+ "reporter_country_of_residence": {
+ "type": "string",
+ "enum": [
+ "AT",
+ "BE",
+ "BG",
+ "HR",
+ "CY",
+ "CZ",
+ "DK",
+ "EE",
+ "FI",
+ "FR",
+ "DE",
+ "GR",
+ "HU",
+ "IE",
+ "IT",
+ "LV",
+ "LT",
+ "LU",
+ "MT",
+ "NL",
+ "PL",
+ "PT",
+ "RO",
+ "SK",
+ "SI",
+ "ES",
+ "SE"
+ ],
+ "description": "EU country code of the reporter residence"
+ },
+ "reporter_fluxer_tag": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 37,
+ "description": "Fluxer tag of the reporter if they have an account"
+ },
+ "report_type": {"type": "string", "enum": ["user"], "description": "Type of report"},
+ "category": {
+ "type": "string",
+ "enum": [
+ "harassment",
+ "hate_speech",
+ "spam_account",
+ "impersonation",
+ "underage_user",
+ "inappropriate_profile",
+ "other"
+ ],
+ "x-enumNames": [
+ "harassment",
+ "hate_speech",
+ "spam_account",
+ "impersonation",
+ "underage_user",
+ "inappropriate_profile",
+ "other"
+ ],
+ "x-enumDescriptions": [
+ "User engages in harassment, bullying, or intimidation",
+ "User promotes hatred against protected groups",
+ "Account used for spamming or bulk messaging",
+ "User falsely claims to be another person or entity",
+ "User appears to be under the minimum required age",
+ "Profile contains inappropriate or offensive content",
+ "Other violations not covered by specific categories"
+ ],
+ "description": "Category of the user report"
+ },
+ "user_id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "user_tag": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 37,
+ "description": "Fluxer tag of the user being reported"
}
},
- "required": ["read_states"]
+ "required": ["ticket", "reporter_full_legal_name", "reporter_country_of_residence", "report_type", "category"]
},
- "ReportResponse": {
+ "GuildDsaReportRequest": {
"type": "object",
"properties": {
- "report_id": {
+ "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
+ "additional_info": {"type": "string", "description": "Additional context or details about the report"},
+ "reporter_full_legal_name": {
"type": "string",
- "pattern": "^(0|[1-9][0-9]*)$",
- "description": "The unique identifier for this report"
+ "description": "Full legal name of the person filing the report"
},
- "status": {"type": "string", "description": "Current status of the report (pending, reviewed, resolved)"},
- "reported_at": {"type": "string", "description": "ISO 8601 timestamp when the report was submitted"}
- },
- "required": ["report_id", "status", "reported_at"]
- },
- "DsaReportRequest": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
- "additional_info": {"type": "string", "description": "Additional context or details about the report"},
- "reporter_full_legal_name": {
- "type": "string",
- "description": "Full legal name of the person filing the report"
- },
- "reporter_country_of_residence": {
- "type": "string",
- "enum": [
- "AT",
- "BE",
- "BG",
- "HR",
- "CY",
- "CZ",
- "DK",
- "EE",
- "FI",
- "FR",
- "DE",
- "GR",
- "HU",
- "IE",
- "IT",
- "LV",
- "LT",
- "LU",
- "MT",
- "NL",
- "PL",
- "PT",
- "RO",
- "SK",
- "SI",
- "ES",
- "SE"
- ],
- "description": "EU country code of the reporter residence"
- },
- "reporter_fluxer_tag": {
- "type": "string",
- "minLength": 3,
- "maxLength": 37,
- "description": "Fluxer tag of the reporter if they have an account"
- },
- "report_type": {"type": "string", "enum": ["message"], "description": "Type of report"},
- "category": {
- "type": "string",
- "enum": [
- "harassment",
- "hate_speech",
- "violent_content",
- "spam",
- "nsfw_violation",
- "illegal_activity",
- "doxxing",
- "self_harm",
- "child_safety",
- "malicious_links",
- "impersonation",
- "other"
- ],
- "x-enumNames": [
- "harassment",
- "hate_speech",
- "violent_content",
- "spam",
- "nsfw_violation",
- "illegal_activity",
- "doxxing",
- "self_harm",
- "child_safety",
- "malicious_links",
- "impersonation",
- "other"
- ],
- "x-enumDescriptions": [
- "Content that harasses, bullies, or intimidates users",
- "Content promoting hatred against protected groups",
- "Content depicting or promoting violence",
- "Unsolicited bulk messages or promotional content",
- "Adult content posted outside age-restricted channels",
- "Content promoting or facilitating illegal activities",
- "Content revealing private personal information",
- "Content promoting self-harm or suicide",
- "Content that endangers minors or depicts child abuse",
- "Links to malware, phishing, or other malicious sites",
- "Content falsely claiming to be another person or entity",
- "Other violations not covered by specific categories"
- ],
- "description": "Category of the message report"
- },
- "message_link": {"type": "string", "description": "Link to the message being reported"},
- "reported_user_tag": {
- "type": "string",
- "minLength": 3,
- "maxLength": 37,
- "description": "Fluxer tag of the user who sent the message"
- }
- },
- "required": [
- "ticket",
- "reporter_full_legal_name",
- "reporter_country_of_residence",
- "report_type",
- "category",
- "message_link"
- ]
+ "reporter_country_of_residence": {
+ "type": "string",
+ "enum": [
+ "AT",
+ "BE",
+ "BG",
+ "HR",
+ "CY",
+ "CZ",
+ "DK",
+ "EE",
+ "FI",
+ "FR",
+ "DE",
+ "GR",
+ "HU",
+ "IE",
+ "IT",
+ "LV",
+ "LT",
+ "LU",
+ "MT",
+ "NL",
+ "PL",
+ "PT",
+ "RO",
+ "SK",
+ "SI",
+ "ES",
+ "SE"
+ ],
+ "description": "EU country code of the reporter residence"
},
- {
- "type": "object",
- "properties": {
- "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
- "additional_info": {"type": "string", "description": "Additional context or details about the report"},
- "reporter_full_legal_name": {
- "type": "string",
- "description": "Full legal name of the person filing the report"
- },
- "reporter_country_of_residence": {
- "type": "string",
- "enum": [
- "AT",
- "BE",
- "BG",
- "HR",
- "CY",
- "CZ",
- "DK",
- "EE",
- "FI",
- "FR",
- "DE",
- "GR",
- "HU",
- "IE",
- "IT",
- "LV",
- "LT",
- "LU",
- "MT",
- "NL",
- "PL",
- "PT",
- "RO",
- "SK",
- "SI",
- "ES",
- "SE"
- ],
- "description": "EU country code of the reporter residence"
- },
- "reporter_fluxer_tag": {
- "type": "string",
- "minLength": 3,
- "maxLength": 37,
- "description": "Fluxer tag of the reporter if they have an account"
- },
- "report_type": {"type": "string", "enum": ["user"], "description": "Type of report"},
- "category": {
- "type": "string",
- "enum": [
- "harassment",
- "hate_speech",
- "spam_account",
- "impersonation",
- "underage_user",
- "inappropriate_profile",
- "other"
- ],
- "x-enumNames": [
- "harassment",
- "hate_speech",
- "spam_account",
- "impersonation",
- "underage_user",
- "inappropriate_profile",
- "other"
- ],
- "x-enumDescriptions": [
- "User engages in harassment, bullying, or intimidation",
- "User promotes hatred against protected groups",
- "Account used for spamming or bulk messaging",
- "User falsely claims to be another person or entity",
- "User appears to be under the minimum required age",
- "Profile contains inappropriate or offensive content",
- "Other violations not covered by specific categories"
- ],
- "description": "Category of the user report"
- },
- "user_id": {"$ref": "#/components/schemas/SnowflakeType"},
- "user_tag": {
- "type": "string",
- "minLength": 3,
- "maxLength": 37,
- "description": "Fluxer tag of the user being reported"
- }
- },
- "required": [
- "ticket",
- "reporter_full_legal_name",
- "reporter_country_of_residence",
- "report_type",
- "category"
- ]
+ "reporter_fluxer_tag": {
+ "type": "string",
+ "minLength": 3,
+ "maxLength": 37,
+ "description": "Fluxer tag of the reporter if they have an account"
},
- {
- "type": "object",
- "properties": {
- "ticket": {"type": "string", "description": "Verification ticket obtained from email verification"},
- "additional_info": {"type": "string", "description": "Additional context or details about the report"},
- "reporter_full_legal_name": {
- "type": "string",
- "description": "Full legal name of the person filing the report"
- },
- "reporter_country_of_residence": {
- "type": "string",
- "enum": [
- "AT",
- "BE",
- "BG",
- "HR",
- "CY",
- "CZ",
- "DK",
- "EE",
- "FI",
- "FR",
- "DE",
- "GR",
- "HU",
- "IE",
- "IT",
- "LV",
- "LT",
- "LU",
- "MT",
- "NL",
- "PL",
- "PT",
- "RO",
- "SK",
- "SI",
- "ES",
- "SE"
- ],
- "description": "EU country code of the reporter residence"
- },
- "reporter_fluxer_tag": {
- "type": "string",
- "minLength": 3,
- "maxLength": 37,
- "description": "Fluxer tag of the reporter if they have an account"
- },
- "report_type": {"type": "string", "enum": ["guild"], "description": "Type of report"},
- "category": {
- "type": "string",
- "enum": [
- "harassment",
- "hate_speech",
- "extremist_community",
- "illegal_activity",
- "child_safety",
- "raid_coordination",
- "spam",
- "malware_distribution",
- "other"
- ],
- "x-enumNames": [
- "harassment",
- "hate_speech",
- "extremist_community",
- "illegal_activity",
- "child_safety",
- "raid_coordination",
- "spam",
- "malware_distribution",
- "other"
- ],
- "x-enumDescriptions": [
- "Guild facilitates harassment, bullying, or intimidation",
- "Guild promotes hatred against protected groups",
- "Guild promotes extremist or terrorist ideologies",
- "Guild promotes or facilitates illegal activities",
- "Guild endangers minors or hosts child abuse content",
- "Guild coordinates attacks on other communities",
- "Guild used for spamming or bulk messaging",
- "Guild distributes malware or malicious software",
- "Other violations not covered by specific categories"
- ],
- "description": "Category of the guild report"
- },
- "guild_id": {"$ref": "#/components/schemas/SnowflakeType"},
- "invite_code": {"type": "string", "description": "Invite code used to access the guild"}
- },
- "required": [
- "ticket",
- "reporter_full_legal_name",
- "reporter_country_of_residence",
- "report_type",
- "category",
- "guild_id"
- ]
- }
+ "report_type": {"type": "string", "enum": ["guild"], "description": "Type of report"},
+ "category": {
+ "type": "string",
+ "enum": [
+ "harassment",
+ "hate_speech",
+ "extremist_community",
+ "illegal_activity",
+ "child_safety",
+ "raid_coordination",
+ "spam",
+ "malware_distribution",
+ "other"
+ ],
+ "x-enumNames": [
+ "harassment",
+ "hate_speech",
+ "extremist_community",
+ "illegal_activity",
+ "child_safety",
+ "raid_coordination",
+ "spam",
+ "malware_distribution",
+ "other"
+ ],
+ "x-enumDescriptions": [
+ "Guild facilitates harassment, bullying, or intimidation",
+ "Guild promotes hatred against protected groups",
+ "Guild promotes extremist or terrorist ideologies",
+ "Guild promotes or facilitates illegal activities",
+ "Guild endangers minors or hosts child abuse content",
+ "Guild coordinates attacks on other communities",
+ "Guild used for spamming or bulk messaging",
+ "Guild distributes malware or malicious software",
+ "Other violations not covered by specific categories"
+ ],
+ "description": "Category of the guild report"
+ },
+ "guild_id": {"$ref": "#/components/schemas/SnowflakeType"},
+ "invite_code": {"type": "string", "description": "Invite code used to access the guild"}
+ },
+ "required": [
+ "ticket",
+ "reporter_full_legal_name",
+ "reporter_country_of_residence",
+ "report_type",
+ "category",
+ "guild_id"
]
},
"OkResponse": {
@@ -34310,76 +34321,80 @@
},
"LocalizedCardPreapprovalContinueResponse": {
"oneOf": [
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "enum": ["pending"],
- "description": "The preapproval result is still being processed"
- }
- },
- "required": ["status"]
+ {"$ref": "#/components/schemas/PendingLocalizedCardPreapprovalContinueResponse"},
+ {"$ref": "#/components/schemas/ReadyLocalizedCardPreapprovalContinueResponse"},
+ {"$ref": "#/components/schemas/RejectedLocalizedCardPreapprovalContinueResponse"},
+ {"$ref": "#/components/schemas/ExpiredLocalizedCardPreapprovalContinueResponse"}
+ ]
+ },
+ "PendingLocalizedCardPreapprovalContinueResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["pending"],
+ "description": "The preapproval result is still being processed"
+ }
+ },
+ "required": ["status"]
+ },
+ "ReadyLocalizedCardPreapprovalContinueResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["ready"],
+ "description": "The preapproval succeeded and the paid checkout URL is ready"
},
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "enum": ["ready"],
- "description": "The preapproval succeeded and the paid checkout URL is ready"
- },
- "url": {"type": "string", "description": "The URL to redirect to"}
- },
- "required": ["status", "url"]
+ "url": {"type": "string", "description": "The URL to redirect to"}
+ },
+ "required": ["status", "url"]
+ },
+ "RejectedLocalizedCardPreapprovalContinueResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["rejected"],
+ "description": "The preapproval failed and the paid checkout should not continue"
},
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "enum": ["rejected"],
- "description": "The preapproval failed and the paid checkout should not continue"
- },
- "reason": {
- "enum": [
- "country_mismatch",
- "missing_customer",
- "missing_payment_method",
- "missing_setup_intent",
- "payment_method_not_card",
- "unknown"
- ],
- "type": "string",
- "x-enumNames": [
- "country_mismatch",
- "missing_customer",
- "missing_payment_method",
- "missing_setup_intent",
- "payment_method_not_card",
- "unknown"
- ],
- "description": "The reason the preapproval was rejected"
- },
- "actual_country": {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "description": "The detected card issuing country when available"
- }
- },
- "required": ["status", "reason"]
+ "reason": {
+ "enum": [
+ "country_mismatch",
+ "missing_customer",
+ "missing_payment_method",
+ "missing_setup_intent",
+ "payment_method_not_card",
+ "unknown"
+ ],
+ "type": "string",
+ "x-enumNames": [
+ "country_mismatch",
+ "missing_customer",
+ "missing_payment_method",
+ "missing_setup_intent",
+ "payment_method_not_card",
+ "unknown"
+ ],
+ "description": "The reason the preapproval was rejected"
},
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "enum": ["expired"],
- "description": "The preapproval token has expired or is unknown"
- }
- },
- "required": ["status"]
+ "actual_country": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "description": "The detected card issuing country when available"
}
- ]
+ },
+ "required": ["status", "reason"]
+ },
+ "ExpiredLocalizedCardPreapprovalContinueResponse": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["expired"],
+ "description": "The preapproval token has expired or is unknown"
+ }
+ },
+ "required": ["status"]
},
"LocalizedCardPreapprovalContinueRequest": {
"type": "object",
diff --git a/packages/openapi/src/converters/ZodToOpenAPI.ts b/packages/openapi/src/converters/ZodToOpenAPI.ts
index 096ad0c0f..305491fff 100644
--- a/packages/openapi/src/converters/ZodToOpenAPI.ts
+++ b/packages/openapi/src/converters/ZodToOpenAPI.ts
@@ -109,6 +109,71 @@ function makeNullableSchema(inner: OpenAPISchemaOrRef): OpenAPISchema {
anyOf: [inner, {type: 'null'}],
};
}
+const discriminatedUnionBranchRegistry = new Map<string, OpenAPISchema>();
+
+export function getRegisteredDiscriminatedUnionBranchSchemas(): Record<string, OpenAPISchema> {
+ const result: Record<string, OpenAPISchema> = {};
+ for (const [name, schema] of discriminatedUnionBranchRegistry) {
+ result[name] = schema;
+ }
+ return result;
+}
+
+function toPascalCase(value: string): string {
+ return value
+ .split(/[^A-Za-z0-9]+/)
+ .filter((word) => word.length > 0)
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
+ .join('');
+}
+
+function discriminatedUnionBranchSuffix(
+ branch: OpenAPISchema,
+ discriminator: string,
+ index: number,
+ usedSuffixes: Set<string>,
+): string {
+ let base = '';
+ const discriminatorProp = branch.properties?.[discriminator];
+ if (discriminatorProp && isOpenAPISchema(discriminatorProp)) {
+ const enumNames = (discriminatorProp as {['x-enumNames']?: Array<string | null>})['x-enumNames'];
+ const enumValues = discriminatorProp.enum;
+ if (Array.isArray(enumNames) && typeof enumNames[0] === 'string') {
+ base = toPascalCase(enumNames[0]);
+ } else if (Array.isArray(enumValues) && enumValues.length === 1 && typeof enumValues[0] === 'string') {
+ base = toPascalCase(enumValues[0]);
+ }
+ }
+ if (base.length === 0) {
+ base = `Variant${index}`;
+ }
+ let suffix = base;
+ if (usedSuffixes.has(suffix)) {
+ suffix = `${base}${index}`;
+ }
+ usedSuffixes.add(suffix);
+ return suffix;
+}
+
+function registerDiscriminatedUnionBranches(
+ unionName: string,
+ discriminator: string,
+ branches: Array<OpenAPISchemaOrRef>,
+): Array<OpenAPISchemaOrRef> {
+ const usedSuffixes = new Set<string>();
+ return branches.map((branch, index) => {
+ if (!isOpenAPISchema(branch)) {
+ return branch;
+ }
+ const suffix = discriminatedUnionBranchSuffix(branch, discriminator, index, usedSuffixes);
+ const branchName = `${suffix}${unionName}`;
+ if (!discriminatedUnionBranchRegistry.has(branchName)) {
+ discriminatedUnionBranchRegistry.set(branchName, branch);
+ }
+ return {$ref: `#/components/schemas/${branchName}`};
+ });
+}
+
export function zodToOpenAPISchema(schema: ZodTypeAny, depth = 0): OpenAPISchemaOrRef {
if (depth > 20) {
return {type: 'object'};
@@ -480,61 +545,16 @@ export function zodToOpenAPISchema(schema: ZodTypeAny, depth = 0): OpenAPISchema
return addDescription(literalSchema, schema);
}
}
- return addDescription(
- {
- oneOf: options.map((opt) => zodToOpenAPISchema(opt, depth + 1)),
- },
- schema,
- );
- }
- case 'ZodDiscriminatedUnion':
- case 'discriminatedUnion': {
- const def = getZodDefinition(schema);
- const discriminator = def.discriminator;
- let optionsArray: Array<ZodTypeAny>;
- let discriminatorValues: Array<unknown> = [];
- if (def.options instanceof Map) {
- discriminatorValues = Array.from(def.options.keys());
- optionsArray = Array.from(def.options.values());
- } else if (Array.isArray(def.options)) {
- optionsArray = def.options;
- } else {
- return {type: 'object'};
- }
- if (optionsArray.length === 0) {
- return {type: 'object'};
- }
- const schemas = optionsArray.map((opt) => zodToOpenAPISchema(opt, depth + 1));
- if (discriminator) {
- const result: OpenAPISchema = {
- oneOf: schemas,
- discriminator: {
- propertyName: discriminator,
- },
- };
- if (discriminatorValues.length > 0 && discriminatorValues.length === schemas.length) {
- const mapping: Record<string, string> = {};
- for (let i = 0; i < discriminatorValues.length; i++) {
- const value = discriminatorValues[i];
- if (typeof value === 'string' || typeof value === 'number') {
- const schemaObj = schemas[i];
- if (isOpenAPISchema(schemaObj) && schemaObj.properties?.[discriminator]) {
- mapping[String(value)] = `#/components/schemas/Option${i}`;
- }
- }
- }
- if (Object.keys(mapping).length > 0) {
- result.discriminator!.mapping = mapping;
- }
- }
- return addDescription(result, schema);
+ const oneOfBranches = options.map((opt) => zodToOpenAPISchema(opt, depth + 1));
+ const unionName = getSchemaName(schema);
+ const unionDiscriminator = getZodDefinition(schema).discriminator;
+ if (unionName && typeof unionDiscriminator === 'string') {
+ return addDescription(
+ {oneOf: registerDiscriminatedUnionBranches(unionName, unionDiscriminator, oneOfBranches)},
+ schema,
+ );
}
- return addDescription(
- {
- oneOf: schemas,
- },
- schema,
- );
+ return addDescription({oneOf: oneOfBranches}, schema);
}
case 'ZodLiteral':
case 'literal': {
diff --git a/packages/openapi/src/generator/OpenAPISchemaRegistryLoader.ts b/packages/openapi/src/generator/OpenAPISchemaRegistryLoader.ts
index 7dcec7591..43db48683 100644
--- a/packages/openapi/src/generator/OpenAPISchemaRegistryLoader.ts
+++ b/packages/openapi/src/generator/OpenAPISchemaRegistryLoader.ts
@@ -1,5 +1,9 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
-import {getRegisteredBitflagSchemas, getRegisteredInt32EnumSchemas} from '@fluxer/openapi/src/converters/ZodToOpenAPI';
+import {
+ getRegisteredBitflagSchemas,
+ getRegisteredDiscriminatedUnionBranchSchemas,
+ getRegisteredInt32EnumSchemas,
+} from '@fluxer/openapi/src/converters/ZodToOpenAPI';
import {OpenAPIGeneratorCatalog} from '@fluxer/openapi/src/generator/OpenAPIGeneratorCatalog';
import {type LoadedSchema, loadSchemas} from '@fluxer/openapi/src/registry/SchemaLoader';
import type {SchemaRegistry} from '@fluxer/openapi/src/registry/SchemaRegistry';
@@ -43,6 +47,11 @@ export async function loadSchemasIntoRegistry(
schemaRegistry.register(name, schema);
}
}
+ for (const [name, schema] of Object.entries(getRegisteredDiscriminatedUnionBranchSchemas())) {
+ if (!schemaRegistry.has(name)) {
+ schemaRegistry.register(name, schema);
+ }
+ }
return {
loadedSchemas,
totalRegisteredSchemas: Object.keys(schemaRegistry.getAllSchemas()).length,
diff --git a/packages/schema/src/domains/message/MessageResponseSchemas.ts b/packages/schema/src/domains/message/MessageResponseSchemas.ts
index 2ac804ece..c1fc7c206 100644
--- a/packages/schema/src/domains/message/MessageResponseSchemas.ts
+++ b/packages/schema/src/domains/message/MessageResponseSchemas.ts
@@ -58,7 +58,7 @@ const ReactionEmojiResponse = z.object({
export const MessageReactionResponse = z.object({
emoji: ReactionEmojiResponse.describe('The emoji used for the reaction'),
count: Int32Type.describe('The total number of times this reaction has been used'),
- me: z.literal(true).nullish().describe('Whether the current user has reacted with this emoji'),
+ me: z.boolean().nullish().describe('Whether the current user has reacted with this emoji'),
});
export type MessageReactionResponse = z.infer<typeof MessageReactionResponse>;
diff --git a/packages/schema/src/domains/premium/PremiumSchemas.ts b/packages/schema/src/domains/premium/PremiumSchemas.ts
index e4f82ba82..3e6b2b7d8 100644
--- a/packages/schema/src/domains/premium/PremiumSchemas.ts
+++ b/packages/schema/src/domains/premium/PremiumSchemas.ts
@@ -258,8 +258,8 @@ export type SelfServeRefundEligibilityResponse = z.infer<typeof SelfServeRefundE
const PremiumBillingState = z.object({
stripe_customer_id: z.string().nullable(),
- current_subscription_price: CurrentSubscriptionPriceResponse,
- pending_subscription_change: PendingSubscriptionChangeResponse,
+ current_subscription_price: CurrentSubscriptionPriceResponse.nullable(),
+ pending_subscription_change: PendingSubscriptionChangeResponse.nullable(),
subscription: PremiumBillingSubscriptionResponse.nullable(),
invoices: z.array(PremiumBillingInvoiceResponse),
invoices_has_more: z.boolean(),