schemas¶
Schemas for the system domain.
API Schemas for guild domain.
- pydantic model byte_bot.server.domain.guilds.schemas.AllowedUsersConfigSchema[source]¶
Bases:
CamelizedBaseModel
Schema for validating allowed users for certain admin actions within a guild.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "AllowedUsersConfigSchema", "description": "Schema for validating allowed users for certain admin actions within a guild.", "type": "object", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "userId": { "format": "uuid", "title": "Userid", "type": "string" } }, "required": [ "guildId", "userId" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field guild_id: UUID [Required] (alias 'guildId')¶
- field user_id: UUID [Required] (alias 'userId')¶
- pydantic model byte_bot.server.domain.guilds.schemas.ForumConfigSchema[source]¶
Bases:
CamelizedBaseModel
Schema for validating forum configuration.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "ForumConfigSchema", "description": "Schema for validating forum configuration.", "type": "object", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "helpForum": { "description": "Is the help forum enabled.", "title": "Help Forum", "type": "boolean" }, "helpForumCategory": { "title": "Helpforumcategory", "type": "string" }, "helpThreadAutoClose": { "title": "Helpthreadautoclose", "type": "boolean" }, "helpThreadAutoCloseDays": { "title": "Helpthreadautoclosedays", "type": "integer" }, "helpThreadNotify": { "title": "Helpthreadnotify", "type": "boolean" }, "helpThreadNotifyRoles": { "items": { "type": "integer" }, "title": "Helpthreadnotifyroles", "type": "array" }, "helpThreadNotifyDays": { "title": "Helpthreadnotifydays", "type": "integer" }, "helpThreadSync": { "title": "Helpthreadsync", "type": "boolean" }, "showcaseForum": { "title": "Showcaseforum", "type": "boolean" }, "showcaseForumCategory": { "title": "Showcaseforumcategory", "type": "string" }, "showcaseThreadAutoClose": { "title": "Showcasethreadautoclose", "type": "boolean" }, "showcaseThreadAutoCloseDays": { "title": "Showcasethreadautoclosedays", "type": "integer" } }, "required": [ "guildId", "helpForum", "helpForumCategory", "helpThreadAutoClose", "helpThreadAutoCloseDays", "helpThreadNotify", "helpThreadNotifyRoles", "helpThreadNotifyDays", "helpThreadSync", "showcaseForum", "showcaseForumCategory", "showcaseThreadAutoClose", "showcaseThreadAutoCloseDays" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field guild_id: UUID [Required] (alias 'guildId')¶
- pydantic model byte_bot.server.domain.guilds.schemas.GitHubConfigSchema[source]¶
Bases:
CamelizedBaseModel
Schema for validating GitHub configuration.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "GitHubConfigSchema", "description": "Schema for validating GitHub configuration.", "type": "object", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "discussionSync": { "title": "Discussionsync", "type": "boolean" }, "githubOrganization": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Githuborganization" }, "githubRepository": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Githubrepository" } }, "required": [ "guildId", "discussionSync", "githubOrganization", "githubRepository" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field guild_id: UUID [Required] (alias 'guildId')¶
- pydantic model byte_bot.server.domain.guilds.schemas.GuildCreate[source]¶
Bases:
CamelizedBaseModel
Schema representing a guild create request.
Todo
Add owner ID
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "GuildCreate", "description": "Schema representing a guild create request.\n\n.. todo:: Add owner ID", "type": "object", "properties": { "id": { "description": "The guild ID.", "title": "Guild ID", "type": "integer" }, "name": { "description": "The guild name.", "title": "Name", "type": "string" } }, "required": [ "id", "name" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- pydantic model byte_bot.server.domain.guilds.schemas.GuildSchema[source]¶
Bases:
CamelizedBaseModel
Schema representing an existing guild.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "GuildSchema", "description": "Schema representing an existing guild.", "type": "object", "properties": { "id": { "description": "The internal database record ID.", "format": "uuid", "title": "Internal ID", "type": "string" }, "guildId": { "description": "The guild ID.", "title": "Guild ID", "type": "integer" }, "guildName": { "description": "The guild name.", "title": "Name", "type": "string" }, "prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The prefix for the guild.", "title": "Prefix" }, "helpChannelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "The channel ID for the help channel.", "title": "Help Channel ID" }, "syncLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The forum label to use for GitHub discussion syncs.", "title": "Sync Label" }, "issueLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is issue linking enabled.", "title": "Issue Linking" }, "commentLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is comment linking enabled.", "title": "Comment Linking" }, "pepLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is PEP linking enabled.", "title": "PEP Linking" }, "githubConfig": { "anyOf": [ { "$ref": "#/$defs/GitHubConfigSchema" }, { "type": "null" } ], "description": "The GitHub configuration for the guild.", "title": "GitHub Config" }, "sotagsConfigs": { "description": "The StackOverflow tags configuration for the guild.", "items": { "$ref": "#/$defs/SOTagsConfigSchema" }, "title": "StackOverflow Tags Configs", "type": "array" }, "allowedUsers": { "description": "The allowed users configuration for the guild.", "items": { "$ref": "#/$defs/AllowedUsersConfigSchema" }, "title": "Allowed Users", "type": "array" }, "forumConfig": { "anyOf": [ { "$ref": "#/$defs/ForumConfigSchema" }, { "type": "null" } ], "description": "The forum configuration for the guild.", "title": "Forum Config" } }, "$defs": { "AllowedUsersConfigSchema": { "description": "Schema for validating allowed users for certain admin actions within a guild.", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "userId": { "format": "uuid", "title": "Userid", "type": "string" } }, "required": [ "guildId", "userId" ], "title": "AllowedUsersConfigSchema", "type": "object" }, "ForumConfigSchema": { "description": "Schema for validating forum configuration.", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "helpForum": { "description": "Is the help forum enabled.", "title": "Help Forum", "type": "boolean" }, "helpForumCategory": { "title": "Helpforumcategory", "type": "string" }, "helpThreadAutoClose": { "title": "Helpthreadautoclose", "type": "boolean" }, "helpThreadAutoCloseDays": { "title": "Helpthreadautoclosedays", "type": "integer" }, "helpThreadNotify": { "title": "Helpthreadnotify", "type": "boolean" }, "helpThreadNotifyRoles": { "items": { "type": "integer" }, "title": "Helpthreadnotifyroles", "type": "array" }, "helpThreadNotifyDays": { "title": "Helpthreadnotifydays", "type": "integer" }, "helpThreadSync": { "title": "Helpthreadsync", "type": "boolean" }, "showcaseForum": { "title": "Showcaseforum", "type": "boolean" }, "showcaseForumCategory": { "title": "Showcaseforumcategory", "type": "string" }, "showcaseThreadAutoClose": { "title": "Showcasethreadautoclose", "type": "boolean" }, "showcaseThreadAutoCloseDays": { "title": "Showcasethreadautoclosedays", "type": "integer" } }, "required": [ "guildId", "helpForum", "helpForumCategory", "helpThreadAutoClose", "helpThreadAutoCloseDays", "helpThreadNotify", "helpThreadNotifyRoles", "helpThreadNotifyDays", "helpThreadSync", "showcaseForum", "showcaseForumCategory", "showcaseThreadAutoClose", "showcaseThreadAutoCloseDays" ], "title": "ForumConfigSchema", "type": "object" }, "GitHubConfigSchema": { "description": "Schema for validating GitHub configuration.", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "discussionSync": { "title": "Discussionsync", "type": "boolean" }, "githubOrganization": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Githuborganization" }, "githubRepository": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Githubrepository" } }, "required": [ "guildId", "discussionSync", "githubOrganization", "githubRepository" ], "title": "GitHubConfigSchema", "type": "object" }, "SOTagsConfigSchema": { "description": "Schema for validating StackOverflow tags configuration.", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "tagName": { "title": "Tagname", "type": "string" } }, "required": [ "guildId", "tagName" ], "title": "SOTagsConfigSchema", "type": "object" } }, "required": [ "id", "guildId", "guildName", "prefix", "helpChannelId", "syncLabel", "issueLinking", "commentLinking", "pepLinking", "githubConfig", "sotagsConfigs", "allowedUsers", "forumConfig" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
allowed_users (list[byte_bot.server.domain.guilds.schemas.AllowedUsersConfigSchema])
forum_config (byte_bot.server.domain.guilds.schemas.ForumConfigSchema | None)
github_config (byte_bot.server.domain.guilds.schemas.GitHubConfigSchema | None)
sotags_configs (list[byte_bot.server.domain.guilds.schemas.SOTagsConfigSchema])
- field internal_id: UUID [Required] (alias 'id')¶
The internal database record ID.
- field help_channel_id: int | None [Required] (alias 'helpChannelId')¶
The channel ID for the help channel.
- field sync_label: str | None [Required] (alias 'syncLabel')¶
The forum label to use for GitHub discussion syncs.
- field github_config: GitHubConfigSchema | None [Required] (alias 'githubConfig')¶
The GitHub configuration for the guild.
- field sotags_configs: list[SOTagsConfigSchema] [Required] (alias 'sotagsConfigs')¶
The StackOverflow tags configuration for the guild.
- field allowed_users: list[AllowedUsersConfigSchema] [Required] (alias 'allowedUsers')¶
The allowed users configuration for the guild.
- field forum_config: ForumConfigSchema | None [Required] (alias 'forumConfig')¶
The forum configuration for the guild.
- pydantic model byte_bot.server.domain.guilds.schemas.GuildUpdate[source]¶
Bases:
CamelizedBaseModel
Schema representing a guild update request.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "GuildUpdate", "description": "Schema representing a guild update request.", "type": "object", "properties": { "id": { "description": "The guild ID.", "title": "Guild ID", "type": "integer" }, "prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The prefix for the guild.", "title": "Prefix" }, "helpChannelId": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "The channel ID for the help channel.", "title": "Help Channel ID" }, "syncLabel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "The forum label to use for GitHub discussion syncs.", "title": "Sync Label" }, "issueLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is issue linking enabled.", "title": "Issue Linking" }, "commentLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is comment linking enabled.", "title": "Comment Linking" }, "pepLinking": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Is PEP linking enabled.", "title": "PEP Linking" } }, "required": [ "id", "prefix", "helpChannelId", "syncLabel", "issueLinking", "commentLinking", "pepLinking" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field help_channel_id: int | None [Required] (alias 'helpChannelId')¶
The channel ID for the help channel.
- pydantic model byte_bot.server.domain.guilds.schemas.SOTagsConfigSchema[source]¶
Bases:
CamelizedBaseModel
Schema for validating StackOverflow tags configuration.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "SOTagsConfigSchema", "description": "Schema for validating StackOverflow tags configuration.", "type": "object", "properties": { "guildId": { "format": "uuid", "title": "Guildid", "type": "string" }, "tagName": { "title": "Tagname", "type": "string" } }, "required": [ "guildId", "tagName" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field guild_id: UUID [Required] (alias 'guildId')¶
- pydantic model byte_bot.server.domain.guilds.schemas.UpdateableGuildSetting[source]¶
Bases:
CamelizedBaseModel
Allowed settings that admins can update for their guild.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Show JSON schema
{ "title": "UpdateableGuildSetting", "description": "Allowed settings that admins can update for their guild.", "type": "object", "properties": { "prefix": { "description": "The prefix for the guild.", "title": "Prefix", "type": "string" }, "helpChannelId": { "description": "The channel ID for the help forum.", "title": "Help Channel ID", "type": "integer" }, "showcaseChannelId": { "description": "The channel ID for the showcase forum.", "title": "Showcase Channel ID", "type": "integer" }, "syncLabel": { "description": "The forum label to use for GitHub discussion syncs.", "title": "Sync Label", "type": "string" }, "issueLinking": { "description": "Is issue linking enabled.", "title": "Issue Linking", "type": "boolean" }, "commentLinking": { "description": "Is comment linking enabled.", "title": "Comment Linking", "type": "boolean" }, "pepLinking": { "description": "Is PEP linking enabled.", "title": "PEP Linking", "type": "boolean" }, "discussionSync": { "description": "Is GitHub discussion sync enabled.", "title": "Discussion Sync", "type": "boolean" }, "githubOrganization": { "description": "The GitHub organization to sync.", "title": "GitHub Organization", "type": "string" }, "githubRepository": { "description": "The GitHub repository to sync.", "title": "GitHub Repository", "type": "string" }, "tagName": { "description": "The StackOverflow tag(s) to sync.", "examples": [ "litestar", "byte", "python" ], "items": { "type": "string" }, "title": "StackOverflow Tag(s)", "type": "array" }, "allowedUserId": { "description": "The user or role ID to allow.", "title": "User ID", "type": "integer" }, "helpForum": { "description": "Is the help forum enabled.", "title": "Help Forum", "type": "boolean" }, "helpForumCategory": { "description": "The help forum category.", "title": "Help Forum Category", "type": "string" }, "helpThreadAutoClose": { "description": "Is the help thread auto close enabled.", "title": "Help Thread Auto Close", "type": "boolean" }, "helpThreadAutoCloseDays": { "description": "The days to auto close help threads after inactivity.", "title": "Help Thread Auto Close Days", "type": "integer" }, "helpThreadNotify": { "description": "Whether to notify roles for unresponded help threads.", "title": "Help Thread Notify", "type": "boolean" }, "helpThreadNotifyRoles": { "description": "The roles to notify for unresponded help threads.", "items": { "type": "integer" }, "title": "Help Thread Notify Roles", "type": "array" }, "helpThreadNotifyDays": { "description": "The days to notify `notify_roles` after not receiving a response.", "title": "Help Thread Notify Days", "type": "integer" }, "helpThreadSync": { "description": "Is the help thread GitHub discussions sync enabled.", "title": "Help Thread Sync", "type": "boolean" }, "showcaseForum": { "description": "Is the showcase forum enabled.", "title": "Showcase Forum", "type": "boolean" }, "showcaseForumCategory": { "description": "The showcase forum category.", "title": "Showcase Forum Category", "type": "string" }, "showcaseThreadAutoClose": { "description": "Is the showcase thread auto close enabled.", "title": "Showcase Thread Auto Close", "type": "boolean" }, "showcaseThreadAutoCloseDays": { "description": "The days to auto close showcase threads after inactivity.", "title": "Showcase Thread Auto Close Days", "type": "integer" } }, "required": [ "prefix", "helpChannelId", "showcaseChannelId", "syncLabel", "issueLinking", "commentLinking", "pepLinking", "discussionSync", "githubOrganization", "githubRepository", "tagName", "allowedUserId", "helpForum", "helpForumCategory", "helpThreadAutoClose", "helpThreadAutoCloseDays", "helpThreadNotify", "helpThreadNotifyRoles", "helpThreadNotifyDays", "helpThreadSync", "showcaseForum", "showcaseForumCategory", "showcaseThreadAutoClose", "showcaseThreadAutoCloseDays" ] }
- Config:
validate_assignment: bool = True
from_attributes: bool = True
use_enum_values: bool = True
arbitrary_types_allowed: bool = True
populate_by_name: bool = True
alias_generator: function = <function camel_case at 0x7f096aee3ec0>
validate_by_alias: bool = True
validate_by_name: bool = True
- Fields:
- field showcase_channel_id: int [Required] (alias 'showcaseChannelId')¶
The channel ID for the showcase forum.
- field sync_label: str [Required] (alias 'syncLabel')¶
The forum label to use for GitHub discussion syncs.
- field pep_linking: bool [Required] (alias 'pepLinking')¶
GitHub Config Settings
Is PEP linking enabled.
- field github_organization: str [Required] (alias 'githubOrganization')¶
The GitHub organization to sync.
- field github_repository: str [Required] (alias 'githubRepository')¶
StackOverflow Tags Config Settings
The GitHub repository to sync.
- field tag_name: list[str] [Required] (alias 'tagName')¶
Allowed Users Config Settings
The StackOverflow tag(s) to sync.
- field allowed_user_id: int [Required] (alias 'allowedUserId')¶
Forum Config Settings
The user or role ID to allow.
- field help_thread_auto_close: bool [Required] (alias 'helpThreadAutoClose')¶
Is the help thread auto close enabled.
- field help_thread_auto_close_days: int [Required] (alias 'helpThreadAutoCloseDays')¶
The days to auto close help threads after inactivity.
- field help_thread_notify: bool [Required] (alias 'helpThreadNotify')¶
Whether to notify roles for unresponded help threads.
- field help_thread_notify_roles: list[int] [Required] (alias 'helpThreadNotifyRoles')¶
The roles to notify for unresponded help threads.
- field help_thread_notify_days: int [Required] (alias 'helpThreadNotifyDays')¶
The days to notify notify_roles after not receiving a response.
- field help_thread_sync: bool [Required] (alias 'helpThreadSync')¶
Showcase forum
Is the help thread GitHub discussions sync enabled.
- field showcase_forum_category: str [Required] (alias 'showcaseForumCategory')¶
The showcase forum category.