// SoulFire Server Configuration Service Protocol
//
// This protocol defines the gRPC service for managing global server-level configuration
// in SoulFire, a Minecraft bot automation framework. Server configuration includes
// settings that affect the entire SoulFire server instance, such as debug logging levels,
// plugin settings, and other server-wide preferences.
//
// The configuration is persisted in a database and changes trigger runtime updates
// (e.g., adjusting log levels for various components like Minecraft, Netty, gRPC, Hibernate).

// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/server.proto (package soulfire.v1, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import type { ServerPlugin, SettingsDefinition, SettingsNamespace, SettingsPage } from "./common_pb.js";
import { file_soulfire_common } from "./common_pb.js";
import { file_soulfire_api_docs } from "./api_docs_pb.js";
import { file_google_api_annotations } from "../google/api/annotations_pb.js";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb.js";
import type { Value } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file soulfire/server.proto.
 */
export const file_soulfire_server: GenFile = /*@__PURE__*/
  fileDesc("ChVzb3VsZmlyZS9zZXJ2ZXIucHJvdG8SC3NvdWxmaXJlLnYxIkUKDFNlcnZlckNvbmZpZxI1CghzZXR0aW5ncxgBIAMoCzIeLnNvdWxmaXJlLnYxLlNldHRpbmdzTmFtZXNwYWNlQgPgQQYiEwoRU2VydmVySW5mb1JlcXVlc3Qi8gEKElNlcnZlckluZm9SZXNwb25zZRIuCgZjb25maWcYASABKAsyGS5zb3VsZmlyZS52MS5TZXJ2ZXJDb25maWdCA+BBAhJCChRzZXR0aW5nc19kZWZpbml0aW9ucxgEIAMoCzIfLnNvdWxmaXJlLnYxLlNldHRpbmdzRGVmaW5pdGlvbkID4EECEjcKD3NlcnZlcl9zZXR0aW5ncxgCIAMoCzIZLnNvdWx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ZXJVcGRhdGVDb25maWdFbnRyeVJlcXVlc3QaLC5zb3VsZmlyZS52MS5TZXJ2ZXJVcGRhdGVDb25maWdFbnRyeVJlc3BvbnNlIqgByvMYYwoaVXBkYXRlIHNlcnZlciBjb25maWcgZW50cnkaFFVQREFURV9TRVJWRVJfQ09ORklHIgZzZXJ2ZXI6J1BlcnNpc3RzIGEgc2luZ2xlIHNlcnZlciBzZXR0aW5nIGVudHJ5LoLT5JMCOzoBKho2L3YxL3NlcnZlci9jb25maWcvbmFtZXNwYWNlcy97bmFtZXNwYWNlfS9lbnRyaWVzL3trZXl9QiEKHWNvbS5zb3VsZmlyZW1jLmdycGMuZ2VuZXJhdGVkUAFiBnByb3RvMw", [file_soulfire_common, file_soulfire_api_docs, file_google_api_annotations, file_google_api_field_behavior, file_google_protobuf_struct]);

/**
 * ServerConfig represents the complete server-level configuration.
 * It contains all settings organized by namespace, where each namespace groups
 * related settings together (e.g., "dev" namespace for developer settings).
 * This configuration is stored persistently and affects server-wide behavior.
 *
 * @generated from message soulfire.v1.ServerConfig
 */
export type ServerConfig = Message<"soulfire.v1.ServerConfig"> & {
  /**
   * Collection of settings organized by namespace.
   * Each namespace contains key-value pairs representing individual settings.
   * The structure allows for hierarchical organization of configuration values.
   *
   * @generated from field: repeated soulfire.v1.SettingsNamespace settings = 1;
   */
  settings: SettingsNamespace[];
};

/**
 * Describes the message soulfire.v1.ServerConfig.
 * Use `create(ServerConfigSchema)` to create a new message.
 */
export const ServerConfigSchema: GenMessage<ServerConfig> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 0);

/**
 * Request message for GetServerInfo RPC.
 * This is an empty request as no parameters are needed to retrieve server information.
 * The server returns all available configuration and metadata.
 *
 * @generated from message soulfire.v1.ServerInfoRequest
 */
export type ServerInfoRequest = Message<"soulfire.v1.ServerInfoRequest"> & {
};

/**
 * Describes the message soulfire.v1.ServerInfoRequest.
 * Use `create(ServerInfoRequestSchema)` to create a new message.
 */
export const ServerInfoRequestSchema: GenMessage<ServerInfoRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 1);

/**
 * Response message for GetServerInfo RPC containing comprehensive server information.
 * This response provides everything needed to render a settings UI, including:
 * - Current configuration values
 * - All available setting definitions with their types and constraints
 * - Page layouts for organizing settings in the UI
 * - Information about registered plugins
 *
 * @generated from message soulfire.v1.ServerInfoResponse
 */
export type ServerInfoResponse = Message<"soulfire.v1.ServerInfoResponse"> & {
  /**
   * The current server configuration containing all persisted settings values.
   * If no configuration has been saved yet, this will contain default/empty values.
   *
   * @generated from field: soulfire.v1.ServerConfig config = 1;
   */
  config?: ServerConfig | undefined;

  /**
   * All available settings definitions that can be rendered by identifier.
   * Each definition includes the setting's type (string, int, bool, etc.),
   * UI metadata (display name, description), constraints (min/max, patterns),
   * and scope (SERVER, INSTANCE, or BOT level).
   * These definitions are referenced by their identifier (namespace + key).
   *
   * @generated from field: repeated soulfire.v1.SettingsDefinition settings_definitions = 4;
   */
  settingsDefinitions: SettingsDefinition[];

  /**
   * Pages that group settings together for UI organization.
   * Each page has an ID, display name, icon, and references settings by their identifiers.
   * Pages may be associated with plugins and can have an "enabled" toggle setting.
   *
   * @generated from field: repeated soulfire.v1.SettingsPage server_settings = 2;
   */
  serverSettings: SettingsPage[];

  /**
   * List of registered plugins on the server.
   * Each plugin includes metadata such as ID, version, description, author,
   * license, and website URL. Plugins may own settings pages.
   *
   * @generated from field: repeated soulfire.v1.ServerPlugin plugins = 3;
   */
  plugins: ServerPlugin[];
};

/**
 * Describes the message soulfire.v1.ServerInfoResponse.
 * Use `create(ServerInfoResponseSchema)` to create a new message.
 */
export const ServerInfoResponseSchema: GenMessage<ServerInfoResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 2);

/**
 * Request message for UpdateServerConfig RPC.
 * Used for bulk configuration updates, typically during profile import operations.
 * This replaces the entire server configuration with the provided values.
 *
 * @generated from message soulfire.v1.ServerUpdateConfigRequest
 */
export type ServerUpdateConfigRequest = Message<"soulfire.v1.ServerUpdateConfigRequest"> & {
  /**
   * The complete new server configuration to apply.
   * This will replace the existing configuration entirely.
   * All settings namespaces and their entries will be overwritten.
   *
   * @generated from field: soulfire.v1.ServerConfig config = 1;
   */
  config?: ServerConfig | undefined;
};

/**
 * Describes the message soulfire.v1.ServerUpdateConfigRequest.
 * Use `create(ServerUpdateConfigRequestSchema)` to create a new message.
 */
export const ServerUpdateConfigRequestSchema: GenMessage<ServerUpdateConfigRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 3);

/**
 * Response message for UpdateServerConfig RPC.
 * An empty response indicates successful configuration update.
 * The new configuration is persisted to the database and runtime hooks are triggered
 * (e.g., log level adjustments take effect immediately).
 *
 * @generated from message soulfire.v1.ServerUpdateConfigResponse
 */
export type ServerUpdateConfigResponse = Message<"soulfire.v1.ServerUpdateConfigResponse"> & {
};

/**
 * Describes the message soulfire.v1.ServerUpdateConfigResponse.
 * Use `create(ServerUpdateConfigResponseSchema)` to create a new message.
 */
export const ServerUpdateConfigResponseSchema: GenMessage<ServerUpdateConfigResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 4);

/**
 * Request message for UpdateServerConfigEntry RPC.
 * Used for granular updates of individual configuration entries.
 * This is the preferred method for real-time UI updates as it only modifies
 * a single setting without affecting other configuration values.
 *
 * @generated from message soulfire.v1.ServerUpdateConfigEntryRequest
 */
export type ServerUpdateConfigEntryRequest = Message<"soulfire.v1.ServerUpdateConfigEntryRequest"> & {
  /**
   * The namespace of the setting to update.
   * Namespaces group related settings together (e.g., "dev" for developer settings).
   * Must match an existing namespace or a new namespace will be created.
   *
   * @generated from field: string namespace = 1;
   */
  namespace: string;

  /**
   * The key identifying the specific setting within the namespace.
   * Combined with namespace, this uniquely identifies the setting.
   * Example: namespace="dev", key="soulfire-debug" for the SoulFire debug setting.
   *
   * @generated from field: string key = 2;
   */
  key: string;

  /**
   * The new value for the setting.
   * Uses google.protobuf.Value to support various JSON types:
   * - string_value for text settings
   * - number_value for int/double settings
   * - bool_value for boolean settings
   * - list_value for string list settings
   * - struct_value for complex settings like min/max ranges
   *
   * @generated from field: google.protobuf.Value value = 3;
   */
  value?: Value | undefined;
};

/**
 * Describes the message soulfire.v1.ServerUpdateConfigEntryRequest.
 * Use `create(ServerUpdateConfigEntryRequestSchema)` to create a new message.
 */
export const ServerUpdateConfigEntryRequestSchema: GenMessage<ServerUpdateConfigEntryRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 5);

/**
 * Response message for UpdateServerConfigEntry RPC.
 * An empty response indicates the setting was successfully updated.
 * The change is persisted to the database and runtime hooks are triggered
 * to apply the new value immediately where applicable.
 *
 * @generated from message soulfire.v1.ServerUpdateConfigEntryResponse
 */
export type ServerUpdateConfigEntryResponse = Message<"soulfire.v1.ServerUpdateConfigEntryResponse"> & {
};

/**
 * Describes the message soulfire.v1.ServerUpdateConfigEntryResponse.
 * Use `create(ServerUpdateConfigEntryResponseSchema)` to create a new message.
 */
export const ServerUpdateConfigEntryResponseSchema: GenMessage<ServerUpdateConfigEntryResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_server, 6);

/**
 * ServerService provides gRPC methods for managing server-level configuration
 * in SoulFire. This service handles global settings that affect the entire
 * SoulFire server instance, including debug logging, plugin configurations,
 * and other server-wide preferences.
 *
 * Configuration changes are persisted to a database and trigger runtime hooks
 * to apply settings immediately (e.g., adjusting log levels for SoulFire,
 * Minecraft, Netty, gRPC, Hibernate, and Via components).
 *
 * All methods require appropriate permissions:
 * - GetServerInfo requires READ_SERVER_CONFIG permission
 * - UpdateServerConfig requires UPDATE_SERVER_CONFIG permission
 * - UpdateServerConfigEntry requires UPDATE_SERVER_CONFIG permission
 *
 * Errors:
 * - PERMISSION_DENIED: If the caller lacks the required permission
 * - INTERNAL: If a database or processing error occurs
 *
 * @generated from service soulfire.v1.ServerService
 */
export const ServerService: GenService<{
  /**
   * Retrieves comprehensive server information including current configuration,
   * all available settings definitions, settings page layouts, and registered plugins.
   *
   * This method is typically called when initializing a settings UI to obtain:
   * 1. Current configuration values to populate form fields
   * 2. Settings definitions describing each setting's type, constraints, and metadata
   * 3. Page definitions for organizing settings into logical groups
   * 4. Plugin information for displaying registered plugins
   *
   * Requires: READ_SERVER_CONFIG permission
   *
   * Returns: ServerInfoResponse with all server configuration and metadata
   * Errors: PERMISSION_DENIED if caller lacks READ_SERVER_CONFIG permission
   *         INTERNAL if a database error occurs while retrieving configuration
   *
   * @generated from rpc soulfire.v1.ServerService.GetServerInfo
   */
  getServerInfo: {
    methodKind: "unary";
    input: typeof ServerInfoRequestSchema;
    output: typeof ServerInfoResponseSchema;
  },
  /**
   * Replaces the entire server configuration with the provided values.
   * This is a bulk update operation primarily used for profile import functionality.
   *
   * Use this method when you need to apply a complete configuration snapshot,
   * such as when importing settings from a saved profile or restoring a backup.
   * For individual setting changes during normal operation, prefer UpdateServerConfigEntry.
   *
   * The new configuration is persisted to the database, and runtime hooks are
   * triggered to apply changes immediately (e.g., log level adjustments).
   *
   * Requires: UPDATE_SERVER_CONFIG permission
   *
   * Returns: Empty ServerUpdateConfigResponse on success
   * Errors: PERMISSION_DENIED if caller lacks UPDATE_SERVER_CONFIG permission
   *         INTERNAL if a database error occurs while saving configuration
   *
   * @generated from rpc soulfire.v1.ServerService.UpdateServerConfig
   */
  updateServerConfig: {
    methodKind: "unary";
    input: typeof ServerUpdateConfigRequestSchema;
    output: typeof ServerUpdateConfigResponseSchema;
  },
  /**
   * Updates a single configuration entry identified by namespace and key.
   * This is a granular update operation for modifying individual settings.
   *
   * This is the preferred method for real-time UI interactions where users
   * modify settings one at a time. It avoids overwriting unrelated settings
   * and is more efficient than replacing the entire configuration.
   *
   * If the namespace doesn't exist, it will be created. If the key doesn't
   * exist within the namespace, it will be added. Existing values are overwritten.
   *
   * The change is persisted to the database, and runtime hooks are triggered
   * to apply the new value immediately where applicable.
   *
   * Requires: UPDATE_SERVER_CONFIG permission
   *
   * Returns: Empty ServerUpdateConfigEntryResponse on success
   * Errors: PERMISSION_DENIED if caller lacks UPDATE_SERVER_CONFIG permission
   *         INTERNAL if a database error occurs while saving the entry
   *
   * @generated from rpc soulfire.v1.ServerService.UpdateServerConfigEntry
   */
  updateServerConfigEntry: {
    methodKind: "unary";
    input: typeof ServerUpdateConfigEntryRequestSchema;
    output: typeof ServerUpdateConfigEntryResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_server, 0);
