diff options
Diffstat (limited to 'lib')
71 files changed, 2351 insertions, 297 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 16926e77775..3f2dbe5edf9 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -275,6 +275,15 @@ return array( 'OCP\\Common\\Exception\\NotFoundException' => $baseDir . '/lib/public/Common/Exception/NotFoundException.php', 'OCP\\Config\\BeforePreferenceDeletedEvent' => $baseDir . '/lib/public/Config/BeforePreferenceDeletedEvent.php', 'OCP\\Config\\BeforePreferenceSetEvent' => $baseDir . '/lib/public/Config/BeforePreferenceSetEvent.php', + 'OCP\\Config\\Exceptions\\IncorrectTypeException' => $baseDir . '/lib/public/Config/Exceptions/IncorrectTypeException.php', + 'OCP\\Config\\Exceptions\\TypeConflictException' => $baseDir . '/lib/public/Config/Exceptions/TypeConflictException.php', + 'OCP\\Config\\Exceptions\\UnknownKeyException' => $baseDir . '/lib/public/Config/Exceptions/UnknownKeyException.php', + 'OCP\\Config\\IUserConfig' => $baseDir . '/lib/public/Config/IUserConfig.php', + 'OCP\\Config\\Lexicon\\Entry' => $baseDir . '/lib/public/Config/Lexicon/Entry.php', + 'OCP\\Config\\Lexicon\\ILexicon' => $baseDir . '/lib/public/Config/Lexicon/ILexicon.php', + 'OCP\\Config\\Lexicon\\Preset' => $baseDir . '/lib/public/Config/Lexicon/Preset.php', + 'OCP\\Config\\Lexicon\\Strictness' => $baseDir . '/lib/public/Config/Lexicon/Strictness.php', + 'OCP\\Config\\ValueType' => $baseDir . '/lib/public/Config/ValueType.php', 'OCP\\Console\\ConsoleEvent' => $baseDir . '/lib/public/Console/ConsoleEvent.php', 'OCP\\Console\\ReservedOptions' => $baseDir . '/lib/public/Console/ReservedOptions.php', 'OCP\\Constants' => $baseDir . '/lib/public/Constants.php', @@ -367,6 +376,7 @@ return array( 'OCP\\Federation\\ICloudFederationShare' => $baseDir . '/lib/public/Federation/ICloudFederationShare.php', 'OCP\\Federation\\ICloudId' => $baseDir . '/lib/public/Federation/ICloudId.php', 'OCP\\Federation\\ICloudIdManager' => $baseDir . '/lib/public/Federation/ICloudIdManager.php', + 'OCP\\Federation\\ICloudIdResolver' => $baseDir . '/lib/public/Federation/ICloudIdResolver.php', 'OCP\\Files' => $baseDir . '/lib/public/Files.php', 'OCP\\FilesMetadata\\AMetadataEvent' => $baseDir . '/lib/public/FilesMetadata/AMetadataEvent.php', 'OCP\\FilesMetadata\\Event\\MetadataBackgroundEvent' => $baseDir . '/lib/public/FilesMetadata/Event/MetadataBackgroundEvent.php', @@ -1208,7 +1218,6 @@ return array( 'OC\\Comments\\ManagerFactory' => $baseDir . '/lib/private/Comments/ManagerFactory.php', 'OC\\Config' => $baseDir . '/lib/private/Config.php', 'OC\\Config\\ConfigManager' => $baseDir . '/lib/private/Config/ConfigManager.php', - 'OC\\Config\\Lexicon\\CoreConfigLexicon' => $baseDir . '/lib/private/Config/Lexicon/CoreConfigLexicon.php', 'OC\\Config\\UserConfig' => $baseDir . '/lib/private/Config/UserConfig.php', 'OC\\Console\\Application' => $baseDir . '/lib/private/Console/Application.php', 'OC\\Console\\TimestampFormatter' => $baseDir . '/lib/private/Console/TimestampFormatter.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index daa1a1940dd..233b667add9 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -316,6 +316,15 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Common\\Exception\\NotFoundException' => __DIR__ . '/../../..' . '/lib/public/Common/Exception/NotFoundException.php', 'OCP\\Config\\BeforePreferenceDeletedEvent' => __DIR__ . '/../../..' . '/lib/public/Config/BeforePreferenceDeletedEvent.php', 'OCP\\Config\\BeforePreferenceSetEvent' => __DIR__ . '/../../..' . '/lib/public/Config/BeforePreferenceSetEvent.php', + 'OCP\\Config\\Exceptions\\IncorrectTypeException' => __DIR__ . '/../../..' . '/lib/public/Config/Exceptions/IncorrectTypeException.php', + 'OCP\\Config\\Exceptions\\TypeConflictException' => __DIR__ . '/../../..' . '/lib/public/Config/Exceptions/TypeConflictException.php', + 'OCP\\Config\\Exceptions\\UnknownKeyException' => __DIR__ . '/../../..' . '/lib/public/Config/Exceptions/UnknownKeyException.php', + 'OCP\\Config\\IUserConfig' => __DIR__ . '/../../..' . '/lib/public/Config/IUserConfig.php', + 'OCP\\Config\\Lexicon\\Entry' => __DIR__ . '/../../..' . '/lib/public/Config/Lexicon/Entry.php', + 'OCP\\Config\\Lexicon\\ILexicon' => __DIR__ . '/../../..' . '/lib/public/Config/Lexicon/ILexicon.php', + 'OCP\\Config\\Lexicon\\Preset' => __DIR__ . '/../../..' . '/lib/public/Config/Lexicon/Preset.php', + 'OCP\\Config\\Lexicon\\Strictness' => __DIR__ . '/../../..' . '/lib/public/Config/Lexicon/Strictness.php', + 'OCP\\Config\\ValueType' => __DIR__ . '/../../..' . '/lib/public/Config/ValueType.php', 'OCP\\Console\\ConsoleEvent' => __DIR__ . '/../../..' . '/lib/public/Console/ConsoleEvent.php', 'OCP\\Console\\ReservedOptions' => __DIR__ . '/../../..' . '/lib/public/Console/ReservedOptions.php', 'OCP\\Constants' => __DIR__ . '/../../..' . '/lib/public/Constants.php', @@ -408,6 +417,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Federation\\ICloudFederationShare' => __DIR__ . '/../../..' . '/lib/public/Federation/ICloudFederationShare.php', 'OCP\\Federation\\ICloudId' => __DIR__ . '/../../..' . '/lib/public/Federation/ICloudId.php', 'OCP\\Federation\\ICloudIdManager' => __DIR__ . '/../../..' . '/lib/public/Federation/ICloudIdManager.php', + 'OCP\\Federation\\ICloudIdResolver' => __DIR__ . '/../../..' . '/lib/public/Federation/ICloudIdResolver.php', 'OCP\\Files' => __DIR__ . '/../../..' . '/lib/public/Files.php', 'OCP\\FilesMetadata\\AMetadataEvent' => __DIR__ . '/../../..' . '/lib/public/FilesMetadata/AMetadataEvent.php', 'OCP\\FilesMetadata\\Event\\MetadataBackgroundEvent' => __DIR__ . '/../../..' . '/lib/public/FilesMetadata/Event/MetadataBackgroundEvent.php', @@ -1249,7 +1259,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\Comments\\ManagerFactory' => __DIR__ . '/../../..' . '/lib/private/Comments/ManagerFactory.php', 'OC\\Config' => __DIR__ . '/../../..' . '/lib/private/Config.php', 'OC\\Config\\ConfigManager' => __DIR__ . '/../../..' . '/lib/private/Config/ConfigManager.php', - 'OC\\Config\\Lexicon\\CoreConfigLexicon' => __DIR__ . '/../../..' . '/lib/private/Config/Lexicon/CoreConfigLexicon.php', 'OC\\Config\\UserConfig' => __DIR__ . '/../../..' . '/lib/private/Config/UserConfig.php', 'OC\\Console\\Application' => __DIR__ . '/../../..' . '/lib/private/Console/Application.php', 'OC\\Console\\TimestampFormatter' => __DIR__ . '/../../..' . '/lib/private/Console/TimestampFormatter.php', diff --git a/lib/composer/composer/platform_check.php b/lib/composer/composer/platform_check.php index 4c3a5d68f14..2beb1491838 100644 --- a/lib/composer/composer/platform_check.php +++ b/lib/composer/composer/platform_check.php @@ -19,8 +19,7 @@ if ($issues) { echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; } } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) ); } diff --git a/lib/l10n/be.js b/lib/l10n/be.js index 4e912495dae..eb38c0ed05e 100644 --- a/lib/l10n/be.js +++ b/lib/l10n/be.js @@ -1,11 +1,20 @@ OC.L10N.register( "lib", { + "Authentication" : "Аўтэнтыфікацыя", + "Unknown filetype" : "Невядомы тып файла", "Files" : "Файлы", + "_%n year ago_::_%n years ago_" : ["%n год таму","%n гады таму","%n гадоў таму","%n гадоў таму"], + "seconds ago" : "с таму", + "Templates" : "Шаблоны", "__language_name__" : "Беларуская", + "Apps" : "Праграмы", "Settings" : "Налады", "Accounts" : "Уліковыя запісы", "Email" : "Электронная пошта", + "Twitter" : "Twitter", + "Role" : "Роля", + "Pronouns" : "Займеннікі", "Sunday" : "Нядзеля", "Monday" : "Панядзелак", "Tuesday" : "Аўторак", @@ -32,6 +41,7 @@ OC.L10N.register( "October" : "Кастрычнік", "November" : "Лістапад", "December" : "Снежань", + "Text" : "Тэкст", "Translate" : "Перакласці" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/lib/l10n/be.json b/lib/l10n/be.json index d45139618d2..d944caed749 100644 --- a/lib/l10n/be.json +++ b/lib/l10n/be.json @@ -1,9 +1,18 @@ { "translations": { + "Authentication" : "Аўтэнтыфікацыя", + "Unknown filetype" : "Невядомы тып файла", "Files" : "Файлы", + "_%n year ago_::_%n years ago_" : ["%n год таму","%n гады таму","%n гадоў таму","%n гадоў таму"], + "seconds ago" : "с таму", + "Templates" : "Шаблоны", "__language_name__" : "Беларуская", + "Apps" : "Праграмы", "Settings" : "Налады", "Accounts" : "Уліковыя запісы", "Email" : "Электронная пошта", + "Twitter" : "Twitter", + "Role" : "Роля", + "Pronouns" : "Займеннікі", "Sunday" : "Нядзеля", "Monday" : "Панядзелак", "Tuesday" : "Аўторак", @@ -30,6 +39,7 @@ "October" : "Кастрычнік", "November" : "Лістапад", "December" : "Снежань", + "Text" : "Тэкст", "Translate" : "Перакласці" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" }
\ No newline at end of file diff --git a/lib/l10n/es.js b/lib/l10n/es.js index 6b8663e2ce5..9c7ea8f5f41 100644 --- a/lib/l10n/es.js +++ b/lib/l10n/es.js @@ -323,12 +323,24 @@ OC.L10N.register( "Storage is temporarily not available" : "El almacenamiento no esta disponible temporalmente", "Storage connection timeout. %s" : "Tiempo de conexión de almacenamiento agotado. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Para permitir que este chequeo se lleve a cabo, debe asegurarse que su servidor pueda conectarse a sí mismo. Por tanto, este debe poder resolver y conectarse a alguno de sus `trusted_domains` o al url definido en `overwrite.cli.url`. Este fallo puede ser resultado de una inconsistencia DNS del lado del servidor o una regla de salida del cortafuegos.", + "Analyze images" : "Analizar imágenes", + "Ask a question about the given images." : "Haga una pregunta acerca de las imágenes proporcionadas.", "Images" : "Imágenes", + "Images to ask a question about" : "Imágenes sobre las cuales se formulará una pregunta", "Question" : "Pregunta", "Generated response" : "Respuesta generada", + "The answer to the question" : "La respuesta a la pregunta", + "Voice chat with the assistant" : "Chat de voz con el asistente", "System prompt" : "Prompt del sistema", "Define rules and assumptions that the assistant should follow during the conversation." : "Definir las reglas y supuestos que el asistente debe seguir durante la conversación.", + "Chat voice message" : "Mensaje de voz del chat", "Chat history" : "Historial de la conversación", + "Input transcript" : "Transcripción de entrada", + "Transcription of the audio input" : "Transcripción de la entrada de audio", + "Response voice message" : "Mensaje de voz de respuesta", + "The generated voice response as part of the conversation" : "La respuesta de voz generada como parte de la conversación", + "Output transcript" : "Transcripción de salida", + "Transcription of the audio output" : "Transcripción de la salida de audio", "Transcribe audio" : "Transcribir audio", "Transcribe the things said in an audio" : "Transcribir las cosas que se dicen en un audio", "Audio input" : "Entrada de audio", diff --git a/lib/l10n/es.json b/lib/l10n/es.json index 997885dd7e1..29ee23631f9 100644 --- a/lib/l10n/es.json +++ b/lib/l10n/es.json @@ -321,12 +321,24 @@ "Storage is temporarily not available" : "El almacenamiento no esta disponible temporalmente", "Storage connection timeout. %s" : "Tiempo de conexión de almacenamiento agotado. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Para permitir que este chequeo se lleve a cabo, debe asegurarse que su servidor pueda conectarse a sí mismo. Por tanto, este debe poder resolver y conectarse a alguno de sus `trusted_domains` o al url definido en `overwrite.cli.url`. Este fallo puede ser resultado de una inconsistencia DNS del lado del servidor o una regla de salida del cortafuegos.", + "Analyze images" : "Analizar imágenes", + "Ask a question about the given images." : "Haga una pregunta acerca de las imágenes proporcionadas.", "Images" : "Imágenes", + "Images to ask a question about" : "Imágenes sobre las cuales se formulará una pregunta", "Question" : "Pregunta", "Generated response" : "Respuesta generada", + "The answer to the question" : "La respuesta a la pregunta", + "Voice chat with the assistant" : "Chat de voz con el asistente", "System prompt" : "Prompt del sistema", "Define rules and assumptions that the assistant should follow during the conversation." : "Definir las reglas y supuestos que el asistente debe seguir durante la conversación.", + "Chat voice message" : "Mensaje de voz del chat", "Chat history" : "Historial de la conversación", + "Input transcript" : "Transcripción de entrada", + "Transcription of the audio input" : "Transcripción de la entrada de audio", + "Response voice message" : "Mensaje de voz de respuesta", + "The generated voice response as part of the conversation" : "La respuesta de voz generada como parte de la conversación", + "Output transcript" : "Transcripción de salida", + "Transcription of the audio output" : "Transcripción de la salida de audio", "Transcribe audio" : "Transcribir audio", "Transcribe the things said in an audio" : "Transcribir las cosas que se dicen en un audio", "Audio input" : "Entrada de audio", diff --git a/lib/l10n/es_CL.js b/lib/l10n/es_CL.js index b9ab4daa8d3..22ae429cf8c 100644 --- a/lib/l10n/es_CL.js +++ b/lib/l10n/es_CL.js @@ -74,6 +74,7 @@ OC.L10N.register( "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", + "Open %s" : "Abrir %s", "Unknown share type" : "Tipo de elemento compartido desconocido", "You are not allowed to share %s" : "No tienes permitido compartir %s", "Cannot increase permissions of %s" : "No se pueden incrementar los permisos de %s", diff --git a/lib/l10n/es_CL.json b/lib/l10n/es_CL.json index 1bb3d70393a..75ed65fb736 100644 --- a/lib/l10n/es_CL.json +++ b/lib/l10n/es_CL.json @@ -72,6 +72,7 @@ "Sharing backend %s must implement the interface OCP\\Share_Backend" : "El backend %s que comparte debe implementar la interface OCP\\Share_Backend", "Sharing backend %s not found" : "No fue encontrado el Backend que comparte %s ", "Sharing backend for %s not found" : "No fue encontrado el Backend que comparte para %s", + "Open %s" : "Abrir %s", "Unknown share type" : "Tipo de elemento compartido desconocido", "You are not allowed to share %s" : "No tienes permitido compartir %s", "Cannot increase permissions of %s" : "No se pueden incrementar los permisos de %s", diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js index 1b86c9138c7..92080235dd5 100644 --- a/lib/l10n/et_EE.js +++ b/lib/l10n/et_EE.js @@ -30,14 +30,14 @@ OC.L10N.register( "%sbit or higher PHP required." : "Vajalik on %s-bitine või parem PHP versioon.", "The following architectures are supported: %s" : "Toetatud on järgnevad arhitektuurid: %s", "The following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leitud", - "The library %s is not available." : "Teek %s pole saadaval.", + "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leidu", + "The library %s is not available." : " %s teek pole saadaval.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek suurema versiooniga kui %2$s - hetkel on versioon %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek väiksema versiooniga kui %2$s - hetkel on versioon %3$s.", "The following platforms are supported: %s" : "Toetatud on järgmised platvormid: %s", "Server version %s or higher is required." : "Nõutav on serveri versioon %s või suurem.", "Server version %s or lower is required." : "Serveri versioon %s või madalam on nõutav.", - "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õiguse selle seadustuse muutmiseks", + "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õigust selle seadustuse muutmiseks", "Your current IP address doesn't allow you to perform admin actions" : "Sinu praeguselt e-posti aadressilt ei saa teha haldustoiminguid", "Logged in account must be an admin or sub admin" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige", "Logged in account must be an admin" : "Sisselogitud kasutajakonto peab olema peakasutajate grupi liige", @@ -160,6 +160,7 @@ OC.L10N.register( "PostgreSQL Login and/or password not valid" : "PostgreSQLi andmebaasi kasutajatunnus ja/või salasõna pole õiged", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk!" : "Mac OS X ei ole toetatud ja %s ei pruugi korralikult toimida sellel platvormil. Kasuta seda omal vastutusel!", "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Tundub, et %s server töötab 32-bitises PHP käituskeskkonnas ja „open_basedir“ on php.ini failis seadistatud. Kui failide suurus on üle 4 GB, siis võib tekkida probleeme ning antud lahenduse kasutamist me ei soovita.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Palun eemalda oma serveri seadistustest php.ini failist „open_basedir“ seadistus või võta kasutusele 64-bitisel platvormil põhinev PHP versioon.", "Set an admin Login." : "Lisa peakasutaja kasutajanimi.", "Set an admin password." : "Lisa peakasutaja salasõna.", @@ -214,6 +215,7 @@ OC.L10N.register( "Group \"%s\" does not exist" : "„%s“ gruppi pole olemas", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "The requested share comes from a disabled user" : "Soovitud jaosmeedia on loonud blokeeritud kasutaja", + "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Kuna kasutajate arvu ülempiir on käes, siis uus kasutaja jäi lisamata. Lisateavet leiad oma teavitustest.", "Could not find category \"%s\"" : "Ei leia kategooriat „%s“", "Input text" : "Sisendtekst", "The input text" : "Sisendtekst", @@ -386,6 +388,8 @@ OC.L10N.register( "Output speech" : "Kõneväljund", "The generated speech" : "Koostatud kõne", "Describe a task that you want the assistant to do or ask a question" : "Kirjelda seda, mida soovid Abilisele ülesandeks teha või lihtsalt küsi midagi.", + "Generated reply" : "Koostatud vastus", + "The generated text from the assistant" : "Abilise poolt koostatud tekst", "Change Tone" : "Teksti tooni muutmine", "Change the tone of a piece of text." : "Muuda antud teksti tonaalsust.", "Write a text that you want the assistant to rewrite in another tone." : "Kirjuta üles see, mille tonaalsust tahad Abilisel lasta ümber kirjutada.", @@ -399,6 +403,9 @@ OC.L10N.register( "The generated response as part of the conversation" : "Loodud vastus vestluse osana", "Formalize text" : "Muuda tekst ametlikuks", "Takes a text and makes it sound more formal" : "Sisestatud teksti vormistamine ametlikuna", + "Write a text that you want the assistant to formalize" : "Sisesta tekst, mille Abiline peaks tegema ametlikumaks", + "Formalized text" : "Ametlikus vormis tekst", + "The formalized text" : "Mitteametlikus vormis tekst", "Generate a headline" : "Alapealkirja loomine", "Generates a possible headline for a text." : "Võimaldab luua teksti põhjal kokkuvõtliku alapealkirja.", "Original text" : "Lähtetekst", @@ -410,7 +417,26 @@ OC.L10N.register( "The text to proofread" : "Keelekorrektuuri vajav tekst", "Corrections" : "Korrektuuris tehtud parandused", "The corrections that should be made in your text" : "Korrektuuris tehtud parandused, mis peaks sinu teksti lisanduma", + "Reformulate text" : "Teksti sõnastuse mutmine", + "Takes a text and reformulates it" : "Sisendina antud tekst saab ümbersõnastatud", + "Write a text that you want the assistant to reformulate" : "Sisesta tekst, mille Abiline peaks ümbersõnastama", + "Reformulated text" : "Ümbersõnastatud tekst", + "The reformulated text, written by the assistant" : "Abilise poolt ümbersõnastatud tekst", + "Simplify text" : "Teksti lihtsustamine", + "Takes a text and simplifies it" : "Sisendina antud tekst saab lihtsustatud", + "Write a text that you want the assistant to simplify" : "Sisesta tekst, mille Abiline peaks tegema lihtsamaks", + "Simplified text" : "Lihtsustatud tekst", + "The simplified text" : "Lihtsustatud tekst", + "Summarize" : "Teksti kokkuvõte", + "Summarizes a text" : "Sisendina antud tekstist tehakse kokkuvõte", + "The original text to summarize" : "Algme tekst, millest peaks tegema kokkuvõtte", "Summary" : "Kokkuvõte", + "The generated summary" : "Koostatud kokkuvõte", + "Extract topics" : "Teemade esiletoomine", + "Extracts topics from a text and outputs them separated by commas" : "Sisendina antud tekstist leitakse teemad, mis väljastatakse komadega eraldatud loendina", + "The original text to extract topics from" : "Lähtetekst, millest teemad tuvastatakse", + "Topics" : "Teemad", + "The list of extracted topics" : "Tuvastatud teemade loend", "Translate" : "Tõlgi", "Translate text from one language to another" : "Tõlgi teksti ühest keelest teise", "Origin text" : "Lähtetekst", diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json index d0d0451b338..b8e16d36993 100644 --- a/lib/l10n/et_EE.json +++ b/lib/l10n/et_EE.json @@ -28,14 +28,14 @@ "%sbit or higher PHP required." : "Vajalik on %s-bitine või parem PHP versioon.", "The following architectures are supported: %s" : "Toetatud on järgnevad arhitektuurid: %s", "The following databases are supported: %s" : "Toetatud on järgnevad andmebaasid: %s", - "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leitud", - "The library %s is not available." : "Teek %s pole saadaval.", + "The command line tool %s could not be found" : "Käsurea töövahendit %s ei leidu", + "The library %s is not available." : " %s teek pole saadaval.", "Library %1$s with a version higher than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek suurema versiooniga kui %2$s - hetkel on versioon %3$s.", "Library %1$s with a version lower than %2$s is required - available version %3$s." : "Vajalik on „%1$s“ teek väiksema versiooniga kui %2$s - hetkel on versioon %3$s.", "The following platforms are supported: %s" : "Toetatud on järgmised platvormid: %s", "Server version %s or higher is required." : "Nõutav on serveri versioon %s või suurem.", "Server version %s or lower is required." : "Serveri versioon %s või madalam on nõutav.", - "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õiguse selle seadustuse muutmiseks", + "Logged in account must be an admin, a sub admin or gotten special right to access this setting" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige või omama eraldi õigust selle seadustuse muutmiseks", "Your current IP address doesn't allow you to perform admin actions" : "Sinu praeguselt e-posti aadressilt ei saa teha haldustoiminguid", "Logged in account must be an admin or sub admin" : "Sisselogitud kasutajakonto peab olema peakasutajate või selle alamgrupi liige", "Logged in account must be an admin" : "Sisselogitud kasutajakonto peab olema peakasutajate grupi liige", @@ -158,6 +158,7 @@ "PostgreSQL Login and/or password not valid" : "PostgreSQLi andmebaasi kasutajatunnus ja/või salasõna pole õiged", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk!" : "Mac OS X ei ole toetatud ja %s ei pruugi korralikult toimida sellel platvormil. Kasuta seda omal vastutusel!", "For the best results, please consider using a GNU/Linux server instead." : "Parema tulemuse saavitamiseks palun kaalu serveris GNU/Linux kasutamist.", + "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "Tundub, et %s server töötab 32-bitises PHP käituskeskkonnas ja „open_basedir“ on php.ini failis seadistatud. Kui failide suurus on üle 4 GB, siis võib tekkida probleeme ning antud lahenduse kasutamist me ei soovita.", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Palun eemalda oma serveri seadistustest php.ini failist „open_basedir“ seadistus või võta kasutusele 64-bitisel platvormil põhinev PHP versioon.", "Set an admin Login." : "Lisa peakasutaja kasutajanimi.", "Set an admin password." : "Lisa peakasutaja salasõna.", @@ -212,6 +213,7 @@ "Group \"%s\" does not exist" : "„%s“ gruppi pole olemas", "The requested share does not exist anymore" : "Soovitud jagamist enam ei eksisteeri", "The requested share comes from a disabled user" : "Soovitud jaosmeedia on loonud blokeeritud kasutaja", + "The user was not created because the user limit has been reached. Check your notifications to learn more." : "Kuna kasutajate arvu ülempiir on käes, siis uus kasutaja jäi lisamata. Lisateavet leiad oma teavitustest.", "Could not find category \"%s\"" : "Ei leia kategooriat „%s“", "Input text" : "Sisendtekst", "The input text" : "Sisendtekst", @@ -384,6 +386,8 @@ "Output speech" : "Kõneväljund", "The generated speech" : "Koostatud kõne", "Describe a task that you want the assistant to do or ask a question" : "Kirjelda seda, mida soovid Abilisele ülesandeks teha või lihtsalt küsi midagi.", + "Generated reply" : "Koostatud vastus", + "The generated text from the assistant" : "Abilise poolt koostatud tekst", "Change Tone" : "Teksti tooni muutmine", "Change the tone of a piece of text." : "Muuda antud teksti tonaalsust.", "Write a text that you want the assistant to rewrite in another tone." : "Kirjuta üles see, mille tonaalsust tahad Abilisel lasta ümber kirjutada.", @@ -397,6 +401,9 @@ "The generated response as part of the conversation" : "Loodud vastus vestluse osana", "Formalize text" : "Muuda tekst ametlikuks", "Takes a text and makes it sound more formal" : "Sisestatud teksti vormistamine ametlikuna", + "Write a text that you want the assistant to formalize" : "Sisesta tekst, mille Abiline peaks tegema ametlikumaks", + "Formalized text" : "Ametlikus vormis tekst", + "The formalized text" : "Mitteametlikus vormis tekst", "Generate a headline" : "Alapealkirja loomine", "Generates a possible headline for a text." : "Võimaldab luua teksti põhjal kokkuvõtliku alapealkirja.", "Original text" : "Lähtetekst", @@ -408,7 +415,26 @@ "The text to proofread" : "Keelekorrektuuri vajav tekst", "Corrections" : "Korrektuuris tehtud parandused", "The corrections that should be made in your text" : "Korrektuuris tehtud parandused, mis peaks sinu teksti lisanduma", + "Reformulate text" : "Teksti sõnastuse mutmine", + "Takes a text and reformulates it" : "Sisendina antud tekst saab ümbersõnastatud", + "Write a text that you want the assistant to reformulate" : "Sisesta tekst, mille Abiline peaks ümbersõnastama", + "Reformulated text" : "Ümbersõnastatud tekst", + "The reformulated text, written by the assistant" : "Abilise poolt ümbersõnastatud tekst", + "Simplify text" : "Teksti lihtsustamine", + "Takes a text and simplifies it" : "Sisendina antud tekst saab lihtsustatud", + "Write a text that you want the assistant to simplify" : "Sisesta tekst, mille Abiline peaks tegema lihtsamaks", + "Simplified text" : "Lihtsustatud tekst", + "The simplified text" : "Lihtsustatud tekst", + "Summarize" : "Teksti kokkuvõte", + "Summarizes a text" : "Sisendina antud tekstist tehakse kokkuvõte", + "The original text to summarize" : "Algme tekst, millest peaks tegema kokkuvõtte", "Summary" : "Kokkuvõte", + "The generated summary" : "Koostatud kokkuvõte", + "Extract topics" : "Teemade esiletoomine", + "Extracts topics from a text and outputs them separated by commas" : "Sisendina antud tekstist leitakse teemad, mis väljastatakse komadega eraldatud loendina", + "The original text to extract topics from" : "Lähtetekst, millest teemad tuvastatakse", + "Topics" : "Teemad", + "The list of extracted topics" : "Tuvastatud teemade loend", "Translate" : "Tõlgi", "Translate text from one language to another" : "Tõlgi teksti ühest keelest teise", "Origin text" : "Lähtetekst", diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js index b6de0091936..edfe25a6362 100644 --- a/lib/l10n/fr.js +++ b/lib/l10n/fr.js @@ -324,13 +324,14 @@ OC.L10N.register( "Storage is temporarily not available" : "Le support de stockage est temporairement indisponible", "Storage connection timeout. %s" : "Le délai d'attente pour la connexion à l'espace de stockage a été dépassé. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Pour autoriser cette vérification, pour devez vous assurer que votre serveur web peut se connecter à lui-même. Il doit donc être capable de résoudre et de se connecter à au moins un de ses `trusted_domains` ou à l'URL `overwrite.cli.url`. Cet échec peut être le résultat d'une erreur de DNS côté serveur ou d'une règle de pare-feu sortante.", + "Analyze images" : "Analyser des images", "Images" : "Images", "Question" : "Question", "Generated response" : "Réponse générée", "System prompt" : "Invite du système", "Define rules and assumptions that the assistant should follow during the conversation." : "Définir les règles et les hypothèses que l'assistant doit suivre pendant la conversation.", "Chat history" : "Historique de la discussion", - "Transcribe audio" : "Transcrire l'audio", + "Transcribe audio" : "Transcrire de l'audio", "Transcribe the things said in an audio" : "Transcrire les propos exprimés dans un fichier audio", "Audio input" : "Entrée audio", "The audio to transcribe" : "Audio à retranscrire", @@ -348,7 +349,7 @@ OC.L10N.register( "Chat message" : "Message de discussion", "A chat message to send to the agent." : "Un message instantané à envoyer à l'agent.", "The response from the chat model." : "La réponse du modèle de messagerie instantanée", - "Context write" : "Écrire contextuellement", + "Context write" : "Écrire selon un contexte", "Writes text in a given style based on the provided source material." : "Écrit un texte dans un style donné, basé sur des données initiales préalablement fournies.", "Writing style" : "Style rédactionnel", "Demonstrate a writing style that you would like to immitate" : "Montrez un style d'écriture que vous aimeriez imiter", @@ -356,12 +357,12 @@ OC.L10N.register( "The content that would like to be rewritten in the new writing style" : "Contenu qui doit être réécrit dans le nouveau style de rédaction", "Generated text" : "Texte généré", "The generated text with content from the source material in the given style" : "Le texte généré reprend le contenu du document source dans le style donné", - "Emoji generator" : "Générateur d'emoji", + "Emoji generator" : "Générateur d'émoji", "Takes text and generates a representative emoji for it." : "Prend un texte et génère un émoji représentatif.", "The text to generate an emoji for" : "Texte pour lequel générer un émoji", "Generated emoji" : "Émoji généré", "The generated emoji based on the input text" : "Émoji généré en fonction du texte saisi", - "Generate image" : "Générer l'image", + "Generate image" : "Générer une image", "Generate an image from a text prompt" : "Générer une image à partir d'un texte", "Prompt" : "Prompt", "Describe the image you want to generate" : "Décrivez l'image que vous souhaitez générer", @@ -369,7 +370,7 @@ OC.L10N.register( "How many images to generate" : "Nombre d'images à générer", "Output images" : "Images de sortie", "The generated images" : "Les images générées", - "Generate speech" : "Générer la vocalisation", + "Generate speech" : "Générer une synthèse vocale", "Generate speech from a transcript" : "Générer la vocalisation à partir d'une transcription", "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la vocalisation", "Output speech" : "Sortie de la vocalisation", @@ -430,7 +431,7 @@ OC.L10N.register( "The original text to summarize" : "Le texte original à résumer", "Summary" : "Résumé", "The generated summary" : "Le résumé généré", - "Extract topics" : "Extraire des thèmes", + "Extract topics" : "Extraire des sujets", "Extracts topics from a text and outputs them separated by commas" : "Extrait les sujets d'un texte et les affiche en les séparant par des virgules.", "The original text to extract topics from" : "Texte original à partir duquel les thèmes sont extraits", "Topics" : "Sujets", diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json index 3776b605f33..6f1edd70da2 100644 --- a/lib/l10n/fr.json +++ b/lib/l10n/fr.json @@ -322,13 +322,14 @@ "Storage is temporarily not available" : "Le support de stockage est temporairement indisponible", "Storage connection timeout. %s" : "Le délai d'attente pour la connexion à l'espace de stockage a été dépassé. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Pour autoriser cette vérification, pour devez vous assurer que votre serveur web peut se connecter à lui-même. Il doit donc être capable de résoudre et de se connecter à au moins un de ses `trusted_domains` ou à l'URL `overwrite.cli.url`. Cet échec peut être le résultat d'une erreur de DNS côté serveur ou d'une règle de pare-feu sortante.", + "Analyze images" : "Analyser des images", "Images" : "Images", "Question" : "Question", "Generated response" : "Réponse générée", "System prompt" : "Invite du système", "Define rules and assumptions that the assistant should follow during the conversation." : "Définir les règles et les hypothèses que l'assistant doit suivre pendant la conversation.", "Chat history" : "Historique de la discussion", - "Transcribe audio" : "Transcrire l'audio", + "Transcribe audio" : "Transcrire de l'audio", "Transcribe the things said in an audio" : "Transcrire les propos exprimés dans un fichier audio", "Audio input" : "Entrée audio", "The audio to transcribe" : "Audio à retranscrire", @@ -346,7 +347,7 @@ "Chat message" : "Message de discussion", "A chat message to send to the agent." : "Un message instantané à envoyer à l'agent.", "The response from the chat model." : "La réponse du modèle de messagerie instantanée", - "Context write" : "Écrire contextuellement", + "Context write" : "Écrire selon un contexte", "Writes text in a given style based on the provided source material." : "Écrit un texte dans un style donné, basé sur des données initiales préalablement fournies.", "Writing style" : "Style rédactionnel", "Demonstrate a writing style that you would like to immitate" : "Montrez un style d'écriture que vous aimeriez imiter", @@ -354,12 +355,12 @@ "The content that would like to be rewritten in the new writing style" : "Contenu qui doit être réécrit dans le nouveau style de rédaction", "Generated text" : "Texte généré", "The generated text with content from the source material in the given style" : "Le texte généré reprend le contenu du document source dans le style donné", - "Emoji generator" : "Générateur d'emoji", + "Emoji generator" : "Générateur d'émoji", "Takes text and generates a representative emoji for it." : "Prend un texte et génère un émoji représentatif.", "The text to generate an emoji for" : "Texte pour lequel générer un émoji", "Generated emoji" : "Émoji généré", "The generated emoji based on the input text" : "Émoji généré en fonction du texte saisi", - "Generate image" : "Générer l'image", + "Generate image" : "Générer une image", "Generate an image from a text prompt" : "Générer une image à partir d'un texte", "Prompt" : "Prompt", "Describe the image you want to generate" : "Décrivez l'image que vous souhaitez générer", @@ -367,7 +368,7 @@ "How many images to generate" : "Nombre d'images à générer", "Output images" : "Images de sortie", "The generated images" : "Les images générées", - "Generate speech" : "Générer la vocalisation", + "Generate speech" : "Générer une synthèse vocale", "Generate speech from a transcript" : "Générer la vocalisation à partir d'une transcription", "Write transcript that you want the assistant to generate speech from" : "Écrire la transcription à partir de laquelle vous voulez générer la vocalisation", "Output speech" : "Sortie de la vocalisation", @@ -428,7 +429,7 @@ "The original text to summarize" : "Le texte original à résumer", "Summary" : "Résumé", "The generated summary" : "Le résumé généré", - "Extract topics" : "Extraire des thèmes", + "Extract topics" : "Extraire des sujets", "Extracts topics from a text and outputs them separated by commas" : "Extrait les sujets d'un texte et les affiche en les séparant par des virgules.", "The original text to extract topics from" : "Texte original à partir duquel les thèmes sont extraits", "Topics" : "Sujets", diff --git a/lib/l10n/ga.js b/lib/l10n/ga.js index 7093ce8a110..2de5f97ab4c 100644 --- a/lib/l10n/ga.js +++ b/lib/l10n/ga.js @@ -324,18 +324,36 @@ OC.L10N.register( "Storage is temporarily not available" : "Níl stóráil ar fáil go sealadach", "Storage connection timeout. %s" : "Teorainn ama ceangail stórála. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Le gur féidir an tseiceáil seo a rith caithfidh tú a chinntiú gur féidir le do fhreastalaí Gréasáin nascadh leis féin. Mar sin caithfidh sé a bheith in ann réiteach agus ceangal a dhéanamh le ceann amháin ar a laghad dá chuid `fearainn_iontaofa` nó an `overwrite.cli.url`. D'fhéadfadh an teip seo a bheith mar thoradh ar mhímheaitseáil DNS ar thaobh an fhreastalaí nó riail balla dóiteáin amach.", + "Analyze images" : "Anailísigh íomhánna", + "Ask a question about the given images." : "Cuir ceist faoi na híomhánna a thugtar.", "Images" : "Íomhánna", + "Images to ask a question about" : "Íomhánna le ceist a chur fúthu", "Question" : "Ceist", + "What to ask about the images." : "Cad atá le fiafraí faoi na híomhánna.", "Generated response" : "Freagra ginte", + "The answer to the question" : "An freagra ar an gceist", + "Audio chat" : "Comhrá fuaime", + "Voice chat with the assistant" : "Comhrá gutha leis an gcúntóir", "System prompt" : "Leid córais", "Define rules and assumptions that the assistant should follow during the conversation." : "Sainmhínigh na rialacha agus na toimhdí ba chóir don chúntóir a leanúint le linn an chomhrá.", + "Chat voice message" : "Teachtaireacht gutha comhrá", + "Describe a task that you want the assistant to do or ask a question." : "Déan cur síos ar thasc ar mhaith leat go ndéanfadh an cúntóir é nó ar cheist a chur.", "Chat history" : "Stair comhrá", + "The history of chat messages before the current message, starting with a message by the user." : "Stair na dteachtaireachtaí comhrá roimh an teachtaireacht reatha, ag tosú le teachtaireacht ón úsáideoir.", + "Input transcript" : "Tras-scríbhinn ionchuir", + "Transcription of the audio input" : "Tras-scríobh an ionchuir fuaime", + "Response voice message" : "Teachtaireacht gutha freagartha", + "The generated voice response as part of the conversation" : "An freagra gutha a ghintear mar chuid den chomhrá", + "Output transcript" : "Tras-scríbhinn aschuir", + "Transcription of the audio output" : "Tras-scríobh an aschuir fuaime", "Transcribe audio" : "Trascríobh fuaime", "Transcribe the things said in an audio" : "Tras-scríobh na rudaí a dúradh i bhfuaim", "Audio input" : "Ionchur fuaime", "The audio to transcribe" : "Fuaime le tras-scríobh", "Transcription" : "Trascríobh", "The transcribed text" : "An téacs tras-scríofa", + "Chat by voice with an agent" : "Comhrá gutha le gníomhaire", + "Describe a task that you want the agent to do or ask a question." : "Déan cur síos ar thasc ar mhaith leat go ndéanfadh an gníomhaire é nó ar cheist a chur.", "Confirmation" : "Daingniú", "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Cibé ar cheart gníomhartha a iarradh roimhe seo a dhearbhú: 0 le séanadh agus 1 le deimhniú.", "Conversation token" : "Comhartha comhartha", diff --git a/lib/l10n/ga.json b/lib/l10n/ga.json index a8fe7126c59..a81cebc37e0 100644 --- a/lib/l10n/ga.json +++ b/lib/l10n/ga.json @@ -322,18 +322,36 @@ "Storage is temporarily not available" : "Níl stóráil ar fáil go sealadach", "Storage connection timeout. %s" : "Teorainn ama ceangail stórála. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Le gur féidir an tseiceáil seo a rith caithfidh tú a chinntiú gur féidir le do fhreastalaí Gréasáin nascadh leis féin. Mar sin caithfidh sé a bheith in ann réiteach agus ceangal a dhéanamh le ceann amháin ar a laghad dá chuid `fearainn_iontaofa` nó an `overwrite.cli.url`. D'fhéadfadh an teip seo a bheith mar thoradh ar mhímheaitseáil DNS ar thaobh an fhreastalaí nó riail balla dóiteáin amach.", + "Analyze images" : "Anailísigh íomhánna", + "Ask a question about the given images." : "Cuir ceist faoi na híomhánna a thugtar.", "Images" : "Íomhánna", + "Images to ask a question about" : "Íomhánna le ceist a chur fúthu", "Question" : "Ceist", + "What to ask about the images." : "Cad atá le fiafraí faoi na híomhánna.", "Generated response" : "Freagra ginte", + "The answer to the question" : "An freagra ar an gceist", + "Audio chat" : "Comhrá fuaime", + "Voice chat with the assistant" : "Comhrá gutha leis an gcúntóir", "System prompt" : "Leid córais", "Define rules and assumptions that the assistant should follow during the conversation." : "Sainmhínigh na rialacha agus na toimhdí ba chóir don chúntóir a leanúint le linn an chomhrá.", + "Chat voice message" : "Teachtaireacht gutha comhrá", + "Describe a task that you want the assistant to do or ask a question." : "Déan cur síos ar thasc ar mhaith leat go ndéanfadh an cúntóir é nó ar cheist a chur.", "Chat history" : "Stair comhrá", + "The history of chat messages before the current message, starting with a message by the user." : "Stair na dteachtaireachtaí comhrá roimh an teachtaireacht reatha, ag tosú le teachtaireacht ón úsáideoir.", + "Input transcript" : "Tras-scríbhinn ionchuir", + "Transcription of the audio input" : "Tras-scríobh an ionchuir fuaime", + "Response voice message" : "Teachtaireacht gutha freagartha", + "The generated voice response as part of the conversation" : "An freagra gutha a ghintear mar chuid den chomhrá", + "Output transcript" : "Tras-scríbhinn aschuir", + "Transcription of the audio output" : "Tras-scríobh an aschuir fuaime", "Transcribe audio" : "Trascríobh fuaime", "Transcribe the things said in an audio" : "Tras-scríobh na rudaí a dúradh i bhfuaim", "Audio input" : "Ionchur fuaime", "The audio to transcribe" : "Fuaime le tras-scríobh", "Transcription" : "Trascríobh", "The transcribed text" : "An téacs tras-scríofa", + "Chat by voice with an agent" : "Comhrá gutha le gníomhaire", + "Describe a task that you want the agent to do or ask a question." : "Déan cur síos ar thasc ar mhaith leat go ndéanfadh an gníomhaire é nó ar cheist a chur.", "Confirmation" : "Daingniú", "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Cibé ar cheart gníomhartha a iarradh roimhe seo a dhearbhú: 0 le séanadh agus 1 le deimhniú.", "Conversation token" : "Comhartha comhartha", diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js index 033371a84a2..3e845827bab 100644 --- a/lib/l10n/tr.js +++ b/lib/l10n/tr.js @@ -324,18 +324,36 @@ OC.L10N.register( "Storage is temporarily not available" : "Depolama geçici olarak kullanılamıyor", "Storage connection timeout. %s" : "Depolama bağlantısı zaman aşımı. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Bu denetimi çalıştırabilmek için site sunucunuzun kendisine bağlanabildiğinden emin olmanız gerekir. Bu nedenle, `trusted_domains` ya da `overwrite.cli.url` değerlerinden en az birini çözümleyebilmeli ve bunlara bağlanabilmelidir. Bu sorun, sunucu tarafındaki bir DNS uyumsuzluğunun veya giden güvenlik duvarı kuralının sonucu olabilir.", + "Analyze images" : "Görselleri incele", + "Ask a question about the given images." : "Verilen görseller ile ilgili bir soru sorun.", "Images" : "Görseller", + "Images to ask a question about" : "Haklarında bir soru sorulacak görseller", "Question" : "Soru", + "What to ask about the images." : "Görseller hakkında ne sorulacağı.", "Generated response" : "Üretilen yanıt", + "The answer to the question" : "Sorunun yanıtı", + "Audio chat" : "Sesli görüşme", + "Voice chat with the assistant" : "Yardımcı ile sesli görüşme", "System prompt" : "Sistem istemi", "Define rules and assumptions that the assistant should follow during the conversation." : "Görüşme sırasında yardımcının uyması gereken kuralları ve varsayımları tanımlayın.", + "Chat voice message" : "Görüşme ses iletisi", + "Describe a task that you want the assistant to do or ask a question." : "Yardımcının yapmasını istediğiniz bir görevi tanımlayın ya da bir soru sorun.", "Chat history" : "Sohbet geçmişi", + "The history of chat messages before the current message, starting with a message by the user." : "Kullanıcının iletisiyle başlayarak, geçerli iletiden önceki sohbet iletilerinin geçmişi.", + "Input transcript" : "Girişin yazıya dökümü", + "Transcription of the audio input" : "Ses girişinin yazıya dökümü", + "Response voice message" : "Yanıt ses iletisi", + "The generated voice response as part of the conversation" : "Sesli görüşmenin parçası olarak oluşturulan yanıt", + "Output transcript" : "Çıkışın yazıya dökümü", + "Transcription of the audio output" : "Ses çıkışının yazıya dökümü", "Transcribe audio" : "Sesten yazıya dönüştür.", "Transcribe the things said in an audio" : "Bir sestekileri yazıya dönüştür", "Audio input" : "Ses girişi", "The audio to transcribe" : "Yazıya dönüştürülecek ses", "Transcription" : "Yazıya dönüştürme", "The transcribed text" : "Dönüştürülen yazı", + "Chat by voice with an agent" : "Bir aracı ile sesli görüşün", + "Describe a task that you want the agent to do or ask a question." : "Aracının yapmasını istediğiniz bir görevi tanımlayın ya da bir soru sorun.", "Confirmation" : "Onaylama", "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Daha önce istenilen işlemlerin onaylanıp onaylanmayacağı: Reddedilmesi için 0, onaylanması için 1.", "Conversation token" : "Görüşme kodu", diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json index a995c0df8fd..ccf11aa4e8a 100644 --- a/lib/l10n/tr.json +++ b/lib/l10n/tr.json @@ -322,18 +322,36 @@ "Storage is temporarily not available" : "Depolama geçici olarak kullanılamıyor", "Storage connection timeout. %s" : "Depolama bağlantısı zaman aşımı. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Bu denetimi çalıştırabilmek için site sunucunuzun kendisine bağlanabildiğinden emin olmanız gerekir. Bu nedenle, `trusted_domains` ya da `overwrite.cli.url` değerlerinden en az birini çözümleyebilmeli ve bunlara bağlanabilmelidir. Bu sorun, sunucu tarafındaki bir DNS uyumsuzluğunun veya giden güvenlik duvarı kuralının sonucu olabilir.", + "Analyze images" : "Görselleri incele", + "Ask a question about the given images." : "Verilen görseller ile ilgili bir soru sorun.", "Images" : "Görseller", + "Images to ask a question about" : "Haklarında bir soru sorulacak görseller", "Question" : "Soru", + "What to ask about the images." : "Görseller hakkında ne sorulacağı.", "Generated response" : "Üretilen yanıt", + "The answer to the question" : "Sorunun yanıtı", + "Audio chat" : "Sesli görüşme", + "Voice chat with the assistant" : "Yardımcı ile sesli görüşme", "System prompt" : "Sistem istemi", "Define rules and assumptions that the assistant should follow during the conversation." : "Görüşme sırasında yardımcının uyması gereken kuralları ve varsayımları tanımlayın.", + "Chat voice message" : "Görüşme ses iletisi", + "Describe a task that you want the assistant to do or ask a question." : "Yardımcının yapmasını istediğiniz bir görevi tanımlayın ya da bir soru sorun.", "Chat history" : "Sohbet geçmişi", + "The history of chat messages before the current message, starting with a message by the user." : "Kullanıcının iletisiyle başlayarak, geçerli iletiden önceki sohbet iletilerinin geçmişi.", + "Input transcript" : "Girişin yazıya dökümü", + "Transcription of the audio input" : "Ses girişinin yazıya dökümü", + "Response voice message" : "Yanıt ses iletisi", + "The generated voice response as part of the conversation" : "Sesli görüşmenin parçası olarak oluşturulan yanıt", + "Output transcript" : "Çıkışın yazıya dökümü", + "Transcription of the audio output" : "Ses çıkışının yazıya dökümü", "Transcribe audio" : "Sesten yazıya dönüştür.", "Transcribe the things said in an audio" : "Bir sestekileri yazıya dönüştür", "Audio input" : "Ses girişi", "The audio to transcribe" : "Yazıya dönüştürülecek ses", "Transcription" : "Yazıya dönüştürme", "The transcribed text" : "Dönüştürülen yazı", + "Chat by voice with an agent" : "Bir aracı ile sesli görüşün", + "Describe a task that you want the agent to do or ask a question." : "Aracının yapmasını istediğiniz bir görevi tanımlayın ya da bir soru sorun.", "Confirmation" : "Onaylama", "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Daha önce istenilen işlemlerin onaylanıp onaylanmayacağı: Reddedilmesi için 0, onaylanması için 1.", "Conversation token" : "Görüşme kodu", diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js index 4b07dd98f4b..4e871b4130f 100644 --- a/lib/l10n/uk.js +++ b/lib/l10n/uk.js @@ -324,33 +324,145 @@ OC.L10N.register( "Storage is temporarily not available" : "Сховище тимчасово недоступне", "Storage connection timeout. %s" : "Час під'єднання до сховища вичерпався. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Щоби дозволити запуск цієї перевірки, потрібно пересвідчитися, що ваш вебсервер може з'єднуватися з самим собою, що передбачає можливість резолвити та з'єднуватися з одним з `trusted_domains` або `overwrite.cli.url`. Неможливість цього може бути результатом незбігу DNS на стороні сервера або встановленими правилами брандмауера.", + "Analyze images" : "Аналізуйте зображення", + "Ask a question about the given images." : "Поставте запитання про наведені зображення.", "Images" : "Зображення", + "Images to ask a question about" : "Зображення, про які можна задати питання", "Question" : "Питання", + "What to ask about the images." : "Що запитати про зображення.", + "Generated response" : "Згенерована відповідь", + "The answer to the question" : "Відповідь на питання", + "Audio chat" : "Аудіо чат", + "Voice chat with the assistant" : "Голосовий чат з асистентом", "System prompt" : "Системний запит", + "Define rules and assumptions that the assistant should follow during the conversation." : "Визначте правила та припущення, яких асистент повинен дотримуватися під час розмови.", + "Chat voice message" : "Голосове повідомлення в чаті", + "Describe a task that you want the assistant to do or ask a question." : "Опишіть завдання, яке ви хочете, щоб асистент виконав, або поставте запитання.", "Chat history" : "Історія чату", + "The history of chat messages before the current message, starting with a message by the user." : "Історія повідомлень чату перед поточним повідомленням, починаючи з повідомлення користувача.", + "Input transcript" : "Вхідна стенограма", + "Transcription of the audio input" : "Транскрипція аудіовходу", + "Response voice message" : "Голосове повідомлення у відповідь", + "The generated voice response as part of the conversation" : "Згенерована голосова відповідь як частина розмови", + "Output transcript" : "Вихідна розшифровка", + "Transcription of the audio output" : "Транскрипція аудіовиходу", "Transcribe audio" : "Транскрибувати аудіо", "Transcribe the things said in an audio" : "Транскрибувати голос", "Audio input" : "Аудіовхід", "The audio to transcribe" : "Аудіо для транскрибування", + "Transcription" : "Транскрипція", "The transcribed text" : "Транскрибований текст", + "Chat by voice with an agent" : "Голосовий чат з агентом", + "Describe a task that you want the agent to do or ask a question." : "Опишіть завдання, яке ви хочете, щоб агент виконав, або поставте запитання.", "Confirmation" : "Підтвердження", + "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Чи підтверджувати раніше запитані дії: 0 для відмови та 1 для підтвердження.", + "Conversation token" : "Токен розмови", + "A token representing the conversation." : "Токен, що представляє розмову.", + "The new conversation token" : "Новий токен розмови", + "Send this along with the next interaction." : "Надішліть це разом з наступною взаємодією.", + "Requested actions by the agent" : "Необхідні дії агента", + "Actions that the agent would like to carry out in JSON format." : "Дії, які агент хотів би виконати у форматі JSON.", + "Chat with an agent" : "Чат з агентом", + "Chat message" : "Повідомлення в чаті", + "A chat message to send to the agent." : "Повідомлення в чаті для відправки агенту.", + "The response from the chat model." : "Відповідь від чат-моделі.", + "Context write" : "Контекстний запис", + "Writes text in a given style based on the provided source material." : "Пише текст у заданому стилі на основі наданого вихідного матеріалу.", "Writing style" : "Стиль письма", + "Demonstrate a writing style that you would like to immitate" : "Продемонструйте стиль письма, який ви хотіли б наслідувати", + "Source material" : "Вихідний матеріал", + "The content that would like to be rewritten in the new writing style" : "Контент, який хотілося б переписати в новому стилі", "Generated text" : "Зґенерований текст", + "The generated text with content from the source material in the given style" : "Згенерований текст з вмістом з вихідного матеріалу в заданому стилі", "Emoji generator" : "Ґенератор емоційок", + "Takes text and generates a representative emoji for it." : "Бере текст і генерує для нього відповідний емодзі.", + "The text to generate an emoji for" : "Текст для створення емодзі для", "Generated emoji" : "Зґенеровані емоційки", + "The generated emoji based on the input text" : "Згенеровані емодзі на основі введеного тексту", "Generate image" : "Зґенерувати зображення", + "Generate an image from a text prompt" : "Створити зображення з текстової підказки", "Prompt" : "Запрошення", + "Describe the image you want to generate" : "Опишіть зображення, яке ви хочете створити", + "Number of images" : "Кількість зображень", + "How many images to generate" : "Скільки зображень генерувати", + "Output images" : "Вихідні зображення", + "The generated images" : "Згенеровані зображення", + "Generate speech" : "Генерування мовлення", + "Generate speech from a transcript" : "Створюйте мовлення з транскрипту", + "Write transcript that you want the assistant to generate speech from" : "Напишіть стенограму, з якої ви хочете, щоб асистент генерував мовлення", + "Output speech" : "Вихідне мовлення", + "The generated speech" : "Згенероване мовлення", + "Free text to text prompt" : "Безкоштовна підказка з тексту на текст", + "Runs an arbitrary prompt through a language model that returns a reply" : "Запускає довільний запит через мовну модель, яка повертає відповідь", + "Describe a task that you want the assistant to do or ask a question" : "Опишіть завдання, яке ви хочете, щоб асистент виконав, або поставте запитання", + "Generated reply" : "Згенерована відповідь", + "The generated text from the assistant" : "Згенерований текст від помічника", + "Change Tone" : "Змінити тон", + "Change the tone of a piece of text." : "Змініть тон фрагмента тексту.", + "Write a text that you want the assistant to rewrite in another tone." : "Напишіть текст, який ви хочете, щоб асистент переписав в іншій тональності.", + "Desired tone" : "Бажаний тон", + "In which tone should your text be rewritten?" : "В якій тональності переписувати текст?", + "The rewritten text in the desired tone, written by the assistant:" : "Переписаний текст у потрібній тональності, написаний асистентом:", "Chat" : "Чат", + "Chat with the assistant" : "Чат з асистентом", + "The history of chat messages before the current message, starting with a message by the user" : "Історія повідомлень чату перед поточним повідомленням, починаючи з повідомлення користувача", "Response message" : "Відповідь", + "The generated response as part of the conversation" : "Згенерована відповідь як частина розмови", + "Chat with tools" : "Чат з інструментами", + "Chat with the language model with tool calling support." : "Чат з мовною моделлю з підтримкою виклику інструментів.", + "Tool message" : "Повідомлення про інструмент", + "The result of tool calls in the last interaction" : "Результат викликів інструментів в останній взаємодії", "Available tools" : "Доступні інструменти", + "The available tools in JSON format" : "Доступні інструменти у форматі JSON", + "The response from the chat model" : "Відповідь від чат-моделі", + "Tool calls" : "Виклики інструментів", + "Tools call instructions from the model in JSON format" : "Інструменти викликають інструкції з моделі у форматі JSON", + "Formalize text" : "Формалізуйте текст", + "Takes a text and makes it sound more formal" : "Бере текст і робить його більш формальним", + "Write a text that you want the assistant to formalize" : "Напишіть текст, який ви хочете, щоб асистент оформив", + "Formalized text" : "Формалізований текст", + "The formalized text" : "Формалізований текст", + "Generate a headline" : "Створіть заголовок", "Generates a possible headline for a text." : "Створює ймовірний заголовок тексту.", + "Original text" : "Оригінальний текст", + "The original text to generate a headline for" : "Вихідний текст для створення заголовка для", + "The generated headline" : "Згенерований заголовок", + "Proofread" : "Вичитано", + "Proofreads a text and lists corrections" : "Вичитує текст і складає список виправлень", "Text" : "Текст", + "The text to proofread" : "Текст для вичитки", + "Corrections" : "Виправлення", + "The corrections that should be made in your text" : "Виправлення, які слід зробити у вашому тексті", + "Reformulate text" : "Переформатуйте текст", + "Takes a text and reformulates it" : "Бере текст і переформатовує його", + "Write a text that you want the assistant to reformulate" : "Напишіть текст, який ви хочете, щоб асистент переформулював", + "Reformulated text" : "Переформульований текст", + "The reformulated text, written by the assistant" : "Переформульований текст, написаний асистентом", + "Simplify text" : "Спростити текст", + "Takes a text and simplifies it" : "Бере текст і спрощує його", + "Write a text that you want the assistant to simplify" : "Напишіть текст, який ви хочете, щоб асистент спростив", + "Simplified text" : "Спрощений текст", + "The simplified text" : "Спрощений текст", "Summarize" : "Підсумок", + "Summarizes a text" : "Підсумовує текст", + "The original text to summarize" : "Оригінальний текст для підбиття підсумків", "Summary" : "Загалом", + "The generated summary" : "Згенерований підсумок", "Extract topics" : "Виділити теми", + "Extracts topics from a text and outputs them separated by commas" : "Витягує теми з тексту і виводить їх через кому", + "The original text to extract topics from" : "Оригінальний текст, з якого можна взяти теми", + "Topics" : "Теми", + "The list of extracted topics" : "Список витягнутих тем", "Translate" : "Перекласти", + "Translate text from one language to another" : "Перекладіть текст з однієї мови на іншу", + "Origin text" : "Вихідний текст", + "The text to translate" : "Текст для перекладу", + "Origin language" : "Мова походження", + "The language of the origin text" : "Мова оригінального тексту", "Target language" : "Цільова мова", + "The desired language to translate the origin text in" : "Бажана мова для перекладу вихідного тексту", "Result" : "Результат", + "The translated text" : "Перекладений текст", "Free prompt" : "Вільне запрошення", "Runs an arbitrary prompt through the language model." : "Виконує довільне запрошення через мовну модель.", "Generate headline" : "Створити заголовок", diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json index 0b7e6dbf87a..285c39ff532 100644 --- a/lib/l10n/uk.json +++ b/lib/l10n/uk.json @@ -322,33 +322,145 @@ "Storage is temporarily not available" : "Сховище тимчасово недоступне", "Storage connection timeout. %s" : "Час під'єднання до сховища вичерпався. %s", "To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its `trusted_domains` or the `overwrite.cli.url`. This failure may be the result of a server-side DNS mismatch or outbound firewall rule." : "Щоби дозволити запуск цієї перевірки, потрібно пересвідчитися, що ваш вебсервер може з'єднуватися з самим собою, що передбачає можливість резолвити та з'єднуватися з одним з `trusted_domains` або `overwrite.cli.url`. Неможливість цього може бути результатом незбігу DNS на стороні сервера або встановленими правилами брандмауера.", + "Analyze images" : "Аналізуйте зображення", + "Ask a question about the given images." : "Поставте запитання про наведені зображення.", "Images" : "Зображення", + "Images to ask a question about" : "Зображення, про які можна задати питання", "Question" : "Питання", + "What to ask about the images." : "Що запитати про зображення.", + "Generated response" : "Згенерована відповідь", + "The answer to the question" : "Відповідь на питання", + "Audio chat" : "Аудіо чат", + "Voice chat with the assistant" : "Голосовий чат з асистентом", "System prompt" : "Системний запит", + "Define rules and assumptions that the assistant should follow during the conversation." : "Визначте правила та припущення, яких асистент повинен дотримуватися під час розмови.", + "Chat voice message" : "Голосове повідомлення в чаті", + "Describe a task that you want the assistant to do or ask a question." : "Опишіть завдання, яке ви хочете, щоб асистент виконав, або поставте запитання.", "Chat history" : "Історія чату", + "The history of chat messages before the current message, starting with a message by the user." : "Історія повідомлень чату перед поточним повідомленням, починаючи з повідомлення користувача.", + "Input transcript" : "Вхідна стенограма", + "Transcription of the audio input" : "Транскрипція аудіовходу", + "Response voice message" : "Голосове повідомлення у відповідь", + "The generated voice response as part of the conversation" : "Згенерована голосова відповідь як частина розмови", + "Output transcript" : "Вихідна розшифровка", + "Transcription of the audio output" : "Транскрипція аудіовиходу", "Transcribe audio" : "Транскрибувати аудіо", "Transcribe the things said in an audio" : "Транскрибувати голос", "Audio input" : "Аудіовхід", "The audio to transcribe" : "Аудіо для транскрибування", + "Transcription" : "Транскрипція", "The transcribed text" : "Транскрибований текст", + "Chat by voice with an agent" : "Голосовий чат з агентом", + "Describe a task that you want the agent to do or ask a question." : "Опишіть завдання, яке ви хочете, щоб агент виконав, або поставте запитання.", "Confirmation" : "Підтвердження", + "Whether to confirm previously requested actions: 0 for denial and 1 for confirmation." : "Чи підтверджувати раніше запитані дії: 0 для відмови та 1 для підтвердження.", + "Conversation token" : "Токен розмови", + "A token representing the conversation." : "Токен, що представляє розмову.", + "The new conversation token" : "Новий токен розмови", + "Send this along with the next interaction." : "Надішліть це разом з наступною взаємодією.", + "Requested actions by the agent" : "Необхідні дії агента", + "Actions that the agent would like to carry out in JSON format." : "Дії, які агент хотів би виконати у форматі JSON.", + "Chat with an agent" : "Чат з агентом", + "Chat message" : "Повідомлення в чаті", + "A chat message to send to the agent." : "Повідомлення в чаті для відправки агенту.", + "The response from the chat model." : "Відповідь від чат-моделі.", + "Context write" : "Контекстний запис", + "Writes text in a given style based on the provided source material." : "Пише текст у заданому стилі на основі наданого вихідного матеріалу.", "Writing style" : "Стиль письма", + "Demonstrate a writing style that you would like to immitate" : "Продемонструйте стиль письма, який ви хотіли б наслідувати", + "Source material" : "Вихідний матеріал", + "The content that would like to be rewritten in the new writing style" : "Контент, який хотілося б переписати в новому стилі", "Generated text" : "Зґенерований текст", + "The generated text with content from the source material in the given style" : "Згенерований текст з вмістом з вихідного матеріалу в заданому стилі", "Emoji generator" : "Ґенератор емоційок", + "Takes text and generates a representative emoji for it." : "Бере текст і генерує для нього відповідний емодзі.", + "The text to generate an emoji for" : "Текст для створення емодзі для", "Generated emoji" : "Зґенеровані емоційки", + "The generated emoji based on the input text" : "Згенеровані емодзі на основі введеного тексту", "Generate image" : "Зґенерувати зображення", + "Generate an image from a text prompt" : "Створити зображення з текстової підказки", "Prompt" : "Запрошення", + "Describe the image you want to generate" : "Опишіть зображення, яке ви хочете створити", + "Number of images" : "Кількість зображень", + "How many images to generate" : "Скільки зображень генерувати", + "Output images" : "Вихідні зображення", + "The generated images" : "Згенеровані зображення", + "Generate speech" : "Генерування мовлення", + "Generate speech from a transcript" : "Створюйте мовлення з транскрипту", + "Write transcript that you want the assistant to generate speech from" : "Напишіть стенограму, з якої ви хочете, щоб асистент генерував мовлення", + "Output speech" : "Вихідне мовлення", + "The generated speech" : "Згенероване мовлення", + "Free text to text prompt" : "Безкоштовна підказка з тексту на текст", + "Runs an arbitrary prompt through a language model that returns a reply" : "Запускає довільний запит через мовну модель, яка повертає відповідь", + "Describe a task that you want the assistant to do or ask a question" : "Опишіть завдання, яке ви хочете, щоб асистент виконав, або поставте запитання", + "Generated reply" : "Згенерована відповідь", + "The generated text from the assistant" : "Згенерований текст від помічника", + "Change Tone" : "Змінити тон", + "Change the tone of a piece of text." : "Змініть тон фрагмента тексту.", + "Write a text that you want the assistant to rewrite in another tone." : "Напишіть текст, який ви хочете, щоб асистент переписав в іншій тональності.", + "Desired tone" : "Бажаний тон", + "In which tone should your text be rewritten?" : "В якій тональності переписувати текст?", + "The rewritten text in the desired tone, written by the assistant:" : "Переписаний текст у потрібній тональності, написаний асистентом:", "Chat" : "Чат", + "Chat with the assistant" : "Чат з асистентом", + "The history of chat messages before the current message, starting with a message by the user" : "Історія повідомлень чату перед поточним повідомленням, починаючи з повідомлення користувача", "Response message" : "Відповідь", + "The generated response as part of the conversation" : "Згенерована відповідь як частина розмови", + "Chat with tools" : "Чат з інструментами", + "Chat with the language model with tool calling support." : "Чат з мовною моделлю з підтримкою виклику інструментів.", + "Tool message" : "Повідомлення про інструмент", + "The result of tool calls in the last interaction" : "Результат викликів інструментів в останній взаємодії", "Available tools" : "Доступні інструменти", + "The available tools in JSON format" : "Доступні інструменти у форматі JSON", + "The response from the chat model" : "Відповідь від чат-моделі", + "Tool calls" : "Виклики інструментів", + "Tools call instructions from the model in JSON format" : "Інструменти викликають інструкції з моделі у форматі JSON", + "Formalize text" : "Формалізуйте текст", + "Takes a text and makes it sound more formal" : "Бере текст і робить його більш формальним", + "Write a text that you want the assistant to formalize" : "Напишіть текст, який ви хочете, щоб асистент оформив", + "Formalized text" : "Формалізований текст", + "The formalized text" : "Формалізований текст", + "Generate a headline" : "Створіть заголовок", "Generates a possible headline for a text." : "Створює ймовірний заголовок тексту.", + "Original text" : "Оригінальний текст", + "The original text to generate a headline for" : "Вихідний текст для створення заголовка для", + "The generated headline" : "Згенерований заголовок", + "Proofread" : "Вичитано", + "Proofreads a text and lists corrections" : "Вичитує текст і складає список виправлень", "Text" : "Текст", + "The text to proofread" : "Текст для вичитки", + "Corrections" : "Виправлення", + "The corrections that should be made in your text" : "Виправлення, які слід зробити у вашому тексті", + "Reformulate text" : "Переформатуйте текст", + "Takes a text and reformulates it" : "Бере текст і переформатовує його", + "Write a text that you want the assistant to reformulate" : "Напишіть текст, який ви хочете, щоб асистент переформулював", + "Reformulated text" : "Переформульований текст", + "The reformulated text, written by the assistant" : "Переформульований текст, написаний асистентом", + "Simplify text" : "Спростити текст", + "Takes a text and simplifies it" : "Бере текст і спрощує його", + "Write a text that you want the assistant to simplify" : "Напишіть текст, який ви хочете, щоб асистент спростив", + "Simplified text" : "Спрощений текст", + "The simplified text" : "Спрощений текст", "Summarize" : "Підсумок", + "Summarizes a text" : "Підсумовує текст", + "The original text to summarize" : "Оригінальний текст для підбиття підсумків", "Summary" : "Загалом", + "The generated summary" : "Згенерований підсумок", "Extract topics" : "Виділити теми", + "Extracts topics from a text and outputs them separated by commas" : "Витягує теми з тексту і виводить їх через кому", + "The original text to extract topics from" : "Оригінальний текст, з якого можна взяти теми", + "Topics" : "Теми", + "The list of extracted topics" : "Список витягнутих тем", "Translate" : "Перекласти", + "Translate text from one language to another" : "Перекладіть текст з однієї мови на іншу", + "Origin text" : "Вихідний текст", + "The text to translate" : "Текст для перекладу", + "Origin language" : "Мова походження", + "The language of the origin text" : "Мова оригінального тексту", "Target language" : "Цільова мова", + "The desired language to translate the origin text in" : "Бажана мова для перекладу вихідного тексту", "Result" : "Результат", + "The translated text" : "Перекладений текст", "Free prompt" : "Вільне запрошення", "Runs an arbitrary prompt through the language model." : "Виконує довільне запрошення через мовну модель.", "Generate headline" : "Створити заголовок", diff --git a/lib/l10n/uz.js b/lib/l10n/uz.js index 231325a7a79..5f51ccfbaef 100644 --- a/lib/l10n/uz.js +++ b/lib/l10n/uz.js @@ -5,12 +5,12 @@ OC.L10N.register( "Authentication" : "Autentifikatsiya", "Unknown filetype" : "Unknown filetype", "Invalid image" : "Invalid image", - "Files" : "Files", + "Files" : "Fayllar", "View profile" : "View profile", "last month" : "last month", "seconds ago" : "seconds ago", "Apps" : "Apps", - "Settings" : "Settings", + "Settings" : "Sozlamalar", "Accounts" : "Akkaunt", "Email" : "Email", "Website" : "Veb-sayt", diff --git a/lib/l10n/uz.json b/lib/l10n/uz.json index fb089ce814e..48de5beb2ab 100644 --- a/lib/l10n/uz.json +++ b/lib/l10n/uz.json @@ -3,12 +3,12 @@ "Authentication" : "Autentifikatsiya", "Unknown filetype" : "Unknown filetype", "Invalid image" : "Invalid image", - "Files" : "Files", + "Files" : "Fayllar", "View profile" : "View profile", "last month" : "last month", "seconds ago" : "seconds ago", "Apps" : "Apps", - "Settings" : "Settings", + "Settings" : "Sozlamalar", "Accounts" : "Akkaunt", "Email" : "Email", "Website" : "Veb-sayt", diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 8a6bb5a4723..c80ee52eb0d 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -7,11 +7,11 @@ */ namespace OC; -use NCU\Config\Exceptions\TypeConflictException; -use NCU\Config\IUserConfig; -use NCU\Config\ValueType; use OC\Config\UserConfig; use OCP\Cache\CappedMemoryCache; +use OCP\Config\Exceptions\TypeConflictException; +use OCP\Config\IUserConfig; +use OCP\Config\ValueType; use OCP\IConfig; use OCP\IDBConnection; use OCP\PreConditionNotMetException; diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index 2e949fedb51..24876675d60 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -56,7 +56,7 @@ abstract class Fetcher { * * @return array */ - protected function fetch($ETag, $content) { + protected function fetch($ETag, $content, $allowUnstable = false) { $appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true); if ((int)$this->config->getAppValue('settings', 'appstore-fetcher-lastFailure', '0') > time() - self::RETRY_AFTER_FAILURE_SECONDS) { return []; diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index f050deba1ca..2280ac1a79f 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -11,12 +11,13 @@ namespace OC; use InvalidArgumentException; use JsonException; -use NCU\Config\Lexicon\ConfigLexiconEntry; -use NCU\Config\Lexicon\ConfigLexiconStrictness; -use NCU\Config\Lexicon\IConfigLexicon; -use NCU\Config\Lexicon\Preset; use OC\AppFramework\Bootstrap\Coordinator; use OC\Config\ConfigManager; +use OCP\Config\Lexicon\Entry; +use OCP\Config\Lexicon\ILexicon; +use OCP\Config\Lexicon\Preset; +use OCP\Config\Lexicon\Strictness; +use OCP\Config\ValueType; use OCP\DB\Exception as DBException; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Exceptions\AppConfigIncorrectTypeException; @@ -62,7 +63,7 @@ class AppConfig implements IAppConfig { private array $valueTypes = []; // type for all config values private bool $fastLoaded = false; private bool $lazyLoaded = false; - /** @var array<string, array{entries: array<string, ConfigLexiconEntry>, aliases: array<string, string>, strictness: ConfigLexiconStrictness}> ['app_id' => ['strictness' => ConfigLexiconStrictness, 'entries' => ['config_key' => ConfigLexiconEntry[]]] */ + /** @var array<string, array{entries: array<string, Entry>, aliases: array<string, string>, strictness: Strictness}> ['app_id' => ['strictness' => ConfigLexiconStrictness, 'entries' => ['config_key' => ConfigLexiconEntry[]]] */ private array $configLexiconDetails = []; private bool $ignoreLexiconAliases = false; private ?Preset $configLexiconPreset = null; @@ -1095,6 +1096,49 @@ class AppConfig implements IAppConfig { } /** + * @inheritDoc + * + * @param string $app id of the app + * @param string $key config key + * + * @return array{app: string, key: string, lazy?: bool, valueType?: ValueType, valueTypeName?: string, sensitive?: bool, default?: string, definition?: string, note?: string} + * @since 32.0.0 + */ + public function getKeyDetails(string $app, string $key): array { + $this->assertParams($app, $key); + try { + $details = $this->getDetails($app, $key); + } catch (AppConfigUnknownKeyException $e) { + $details = [ + 'app' => $app, + 'key' => $key + ]; + } + + /** @var Entry $lexiconEntry */ + try { + $lazy = false; + $this->matchAndApplyLexiconDefinition($app, $key, $lazy, lexiconEntry: $lexiconEntry); + } catch (AppConfigTypeConflictException|AppConfigUnknownKeyException) { + // can be ignored + } + + if ($lexiconEntry !== null) { + $details = array_merge($details, [ + 'lazy' => $lexiconEntry->isLazy(), + 'valueType' => $lexiconEntry->getValueType(), + 'valueTypeName' => $lexiconEntry->getValueType()->name, + 'sensitive' => $lexiconEntry->isFlagged(self::FLAG_SENSITIVE), + 'default' => $lexiconEntry->getDefault($this->getLexiconPreset()), + 'definition' => $lexiconEntry->getDefinition(), + 'note' => $lexiconEntry->getNote(), + ]); + } + + return array_filter($details); + } + + /** * @param string $type * * @return int @@ -1631,6 +1675,7 @@ class AppConfig implements IAppConfig { ?bool &$lazy = null, int &$type = self::VALUE_MIXED, ?string &$default = null, + ?Entry &$lexiconEntry = null, ): bool { if (in_array($key, [ @@ -1655,27 +1700,27 @@ class AppConfig implements IAppConfig { return true; } - /** @var ConfigLexiconEntry $configValue */ - $configValue = $configDetails['entries'][$key]; + /** @var Entry $lexiconEntry */ + $lexiconEntry = $configDetails['entries'][$key]; $type &= ~self::VALUE_SENSITIVE; - $appConfigValueType = $configValue->getValueType()->toAppConfigFlag(); + $appConfigValueType = $lexiconEntry->getValueType()->toAppConfigFlag(); if ($type === self::VALUE_MIXED) { $type = $appConfigValueType; // we overwrite if value was requested as mixed } elseif ($appConfigValueType !== $type) { throw new AppConfigTypeConflictException('The app config key ' . $app . '/' . $key . ' is typed incorrectly in relation to the config lexicon'); } - $lazy = $configValue->isLazy(); + $lazy = $lexiconEntry->isLazy(); // only look for default if needed, default from Lexicon got priority if ($default !== null) { - $default = $configValue->getDefault($this->getLexiconPreset()) ?? $default; + $default = $lexiconEntry->getDefault($this->getLexiconPreset()) ?? $default; } - if ($configValue->isFlagged(self::FLAG_SENSITIVE)) { + if ($lexiconEntry->isFlagged(self::FLAG_SENSITIVE)) { $type |= self::VALUE_SENSITIVE; } - if ($configValue->isDeprecated()) { + if ($lexiconEntry->isDeprecated()) { $this->logger->notice('App config key ' . $app . '/' . $key . ' is set as deprecated.'); } @@ -1685,15 +1730,15 @@ class AppConfig implements IAppConfig { /** * manage ConfigLexicon behavior based on strictness set in IConfigLexicon * - * @param ConfigLexiconStrictness|null $strictness + * @param Strictness|null $strictness * @param string $line * * @return bool TRUE if conflict can be fully ignored, FALSE if action should be not performed * @throws AppConfigUnknownKeyException if strictness implies exception - * @see IConfigLexicon::getStrictness() + * @see ILexicon::getStrictness() */ private function applyLexiconStrictness( - ?ConfigLexiconStrictness $strictness, + ?Strictness $strictness, string $line = '', ): bool { if ($strictness === null) { @@ -1701,12 +1746,12 @@ class AppConfig implements IAppConfig { } switch ($strictness) { - case ConfigLexiconStrictness::IGNORE: + case Strictness::IGNORE: return true; - case ConfigLexiconStrictness::NOTICE: + case Strictness::NOTICE: $this->logger->notice($line); return true; - case ConfigLexiconStrictness::WARNING: + case Strictness::WARNING: $this->logger->warning($line); return false; } @@ -1720,7 +1765,7 @@ class AppConfig implements IAppConfig { * @param string $appId * @internal * - * @return array{entries: array<string, ConfigLexiconEntry>, aliases: array<string, string>, strictness: ConfigLexiconStrictness} + * @return array{entries: array<string, Entry>, aliases: array<string, string>, strictness: Strictness} */ public function getConfigDetailsFromLexicon(string $appId): array { if (!array_key_exists($appId, $this->configLexiconDetails)) { @@ -1737,14 +1782,14 @@ class AppConfig implements IAppConfig { $this->configLexiconDetails[$appId] = [ 'entries' => $entries, 'aliases' => $aliases, - 'strictness' => $configLexicon?->getStrictness() ?? ConfigLexiconStrictness::IGNORE + 'strictness' => $configLexicon?->getStrictness() ?? Strictness::IGNORE ]; } return $this->configLexiconDetails[$appId]; } - private function getLexiconEntry(string $appId, string $key): ?ConfigLexiconEntry { + private function getLexiconEntry(string $appId, string $key): ?Entry { return $this->getConfigDetailsFromLexicon($appId)['entries'][$key] ?? null; } diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 95ad129c466..8bd1ff35610 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -10,8 +10,6 @@ declare(strict_types=1); namespace OC\AppFramework\Bootstrap; use Closure; -use NCU\Config\Lexicon\IConfigLexicon; -use OC\Config\Lexicon\CoreConfigLexicon; use OC\Support\CrashReport\Registry; use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IRegistrationContext; @@ -23,6 +21,7 @@ use OCP\Calendar\Resource\IBackend as IResourceBackend; use OCP\Calendar\Room\IBackend as IRoomBackend; use OCP\Capabilities\ICapability; use OCP\Collaboration\Reference\IReferenceProvider; +use OCP\Config\Lexicon\ILexicon; use OCP\Dashboard\IManager; use OCP\Dashboard\IWidget; use OCP\EventDispatcher\IEventDispatcher; @@ -144,7 +143,7 @@ class RegistrationContext { private array $declarativeSettings = []; /** @var array<array-key, string> */ - private array $configLexiconClasses = ['core' => CoreConfigLexicon::class]; + private array $configLexiconClasses = []; /** @var ServiceRegistration<ITeamResourceProvider>[] */ private array $teamResourceProviders = []; @@ -652,7 +651,7 @@ class RegistrationContext { } /** - * @psalm-param class-string<IConfigLexicon> $configLexiconClass + * @psalm-param class-string<ILexicon> $configLexiconClass */ public function registerConfigLexicon(string $appId, string $configLexiconClass): void { $this->configLexiconClasses[$appId] = $configLexiconClass; @@ -1023,9 +1022,9 @@ class RegistrationContext { * * @param string $appId * - * @return IConfigLexicon|null + * @return ILexicon|null */ - public function getConfigLexicon(string $appId): ?IConfigLexicon { + public function getConfigLexicon(string $appId): ?ILexicon { if (!array_key_exists($appId, $this->configLexiconClasses)) { return null; } diff --git a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php index e4571dfc50e..b69b129f798 100644 --- a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php +++ b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php @@ -15,6 +15,7 @@ use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Middleware; use OCP\ISession; use OCP\IUserSession; +use Psr\Log\LoggerInterface; use ReflectionMethod; // Will close the session if the user session is ephemeral. @@ -24,6 +25,7 @@ class FlowV2EphemeralSessionsMiddleware extends Middleware { private ISession $session, private IUserSession $userSession, private ControllerMethodReflector $reflector, + private LoggerInterface $logger, ) { } @@ -52,6 +54,10 @@ class FlowV2EphemeralSessionsMiddleware extends Middleware { return; } + $this->logger->info('Closing user and PHP session for ephemeral session', [ + 'controller' => $controller::class, + 'method' => $methodName, + ]); $this->userSession->logout(); $this->session->close(); } diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php index 0d88200cff7..c00a51e3851 100644 --- a/lib/private/BackgroundJob/JobList.php +++ b/lib/private/BackgroundJob/JobList.php @@ -24,6 +24,9 @@ use function min; use function strlen; class JobList implements IJobList { + /** @var array<string, int> */ + protected array $alreadyVisitedParallelBlocked = []; + public function __construct( protected IDBConnection $connection, protected IConfig $config, @@ -198,6 +201,12 @@ class JobList implements IJobList { $job = $this->buildJob($row); if ($job instanceof IParallelAwareJob && !$job->getAllowParallelRuns() && $this->hasReservedJob(get_class($job))) { + if (!isset($this->alreadyVisitedParallelBlocked[get_class($job)])) { + $this->alreadyVisitedParallelBlocked[get_class($job)] = $job->getId(); + } elseif ($this->alreadyVisitedParallelBlocked[get_class($job)] === $job->getId()) { + $this->logger->info('Skipped through all jobs and revisited a IParallelAwareJob blocked job again, giving up.', ['app' => 'cron']); + return null; + } $this->logger->info('Skipping ' . get_class($job) . ' job with ID ' . $job->getId() . ' because another job with the same class is already running', ['app' => 'cron']); $update = $this->connection->getQueryBuilder(); @@ -210,6 +219,10 @@ class JobList implements IJobList { return $this->getNext($onlyTimeSensitive, $jobClasses); } + if ($job !== null && isset($this->alreadyVisitedParallelBlocked[get_class($job)])) { + unset($this->alreadyVisitedParallelBlocked[get_class($job)]); + } + if ($job instanceof \OCP\BackgroundJob\TimedJob) { $now = $this->timeFactory->getTime(); $nextPossibleRun = $job->getLastRun() + $job->getInterval(); diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php index 0e2a3f5f679..7da1379809d 100644 --- a/lib/private/Calendar/Manager.php +++ b/lib/private/Calendar/Manager.php @@ -403,7 +403,10 @@ class Manager implements IManager { } if (empty($found)) { - $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue()); + $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [ + 'principalUri' => $principalUri, + 'eventUid' => $vEvent->{'UID'}->getValue(), + ]); return false; } @@ -518,7 +521,10 @@ class Manager implements IManager { } if (empty($found)) { - $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue()); + $this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [ + 'principalUri' => $principalUri, + 'eventUid' => $vEvent->{'UID'}->getValue(), + ]); return false; } diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php index 32c70549a7b..ea39f885fc6 100644 --- a/lib/private/Collaboration/Collaborators/Search.php +++ b/lib/private/Collaboration/Collaborators/Search.php @@ -11,7 +11,7 @@ use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; use OCP\IContainer; -use OCP\Share; +use OCP\Share\IShare; class Search implements ISearch { protected array $pluginList = []; @@ -81,7 +81,7 @@ class Search implements ISearch { } public function registerPlugin(array $pluginInfo): void { - $shareType = constant(Share::class . '::' . $pluginInfo['shareType']); + $shareType = constant(IShare::class . '::' . substr($pluginInfo['shareType'], strlen('SHARE_'))); if ($shareType === null) { throw new \InvalidArgumentException('Provided ShareType is invalid'); } diff --git a/lib/private/Config/ConfigManager.php b/lib/private/Config/ConfigManager.php index 67466617941..ed516abdcbf 100644 --- a/lib/private/Config/ConfigManager.php +++ b/lib/private/Config/ConfigManager.php @@ -9,13 +9,13 @@ declare(strict_types=1); namespace OC\Config; use JsonException; -use NCU\Config\Exceptions\TypeConflictException; -use NCU\Config\IUserConfig; -use NCU\Config\Lexicon\ConfigLexiconEntry; -use NCU\Config\Lexicon\Preset; -use NCU\Config\ValueType; use OC\AppConfig; use OCP\App\IAppManager; +use OCP\Config\Exceptions\TypeConflictException; +use OCP\Config\IUserConfig; +use OCP\Config\Lexicon\Entry; +use OCP\Config\Lexicon\Preset; +use OCP\Config\ValueType; use OCP\IAppConfig; use OCP\IConfig; use OCP\Server; @@ -50,10 +50,11 @@ class ConfigManager { * * This method should be mainly called during a new upgrade or when a new app is enabled. * - * @see ConfigLexiconEntry + * @param string|null $appId when set to NULL the method will be executed for all enabled apps of the instance + * * @internal * @since 32.0.0 - * @param string|null $appId when set to NULL the method will be executed for all enabled apps of the instance + * @see Entry */ public function migrateConfigLexiconKeys(?string $appId = null): void { if ($appId === null) { @@ -166,7 +167,7 @@ class ConfigManager { * * @throws TypeConflictException if previous value does not fit the expected type */ - private function migrateAppConfigValue(string $appId, ConfigLexiconEntry $entry): void { + private function migrateAppConfigValue(string $appId, Entry $entry): void { $value = $this->appConfig->getValueMixed($appId, $entry->getRename(), lazy: null); switch ($entry->getValueType()) { case ValueType::STRING: @@ -196,7 +197,7 @@ class ConfigManager { * * @throws TypeConflictException if previous value does not fit the expected type */ - private function migrateUserConfigValue(string $userId, string $appId, ConfigLexiconEntry $entry): void { + private function migrateUserConfigValue(string $userId, string $appId, Entry $entry): void { $value = $this->userConfig->getValueMixed($userId, $appId, $entry->getRename(), lazy: null); switch ($entry->getValueType()) { case ValueType::STRING: @@ -237,7 +238,7 @@ class ConfigManager { return (float)$value; } - public function convertToBool(string $value, ?ConfigLexiconEntry $entry = null): bool { + public function convertToBool(string $value, ?Entry $entry = null): bool { if (in_array(strtolower($value), ['true', '1', 'on', 'yes'])) { $valueBool = true; } elseif (in_array(strtolower($value), ['false', '0', 'off', 'no'])) { @@ -245,7 +246,7 @@ class ConfigManager { } else { throw new TypeConflictException('Value cannot be converted to boolean'); } - if ($entry?->hasOption(ConfigLexiconEntry::RENAME_INVERT_BOOLEAN) === true) { + if ($entry?->hasOption(Entry::RENAME_INVERT_BOOLEAN) === true) { $valueBool = !$valueBool; } diff --git a/lib/private/Config/Lexicon/CoreConfigLexicon.php b/lib/private/Config/Lexicon/CoreConfigLexicon.php deleted file mode 100644 index 34a0b883c54..00000000000 --- a/lib/private/Config/Lexicon/CoreConfigLexicon.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -declare(strict_types=1); -/** - * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -namespace OC\Config\Lexicon; - -use NCU\Config\Lexicon\ConfigLexiconEntry; -use NCU\Config\Lexicon\ConfigLexiconStrictness; -use NCU\Config\Lexicon\IConfigLexicon; -use NCU\Config\ValueType; - -/** - * ConfigLexicon for 'core' app/user configs - */ -class CoreConfigLexicon implements IConfigLexicon { - public function getStrictness(): ConfigLexiconStrictness { - return ConfigLexiconStrictness::IGNORE; - } - - /** - * @inheritDoc - * @return ConfigLexiconEntry[] - */ - public function getAppConfigs(): array { - return [ - new ConfigLexiconEntry('lastcron', ValueType::INT, 0, 'timestamp of last cron execution'), - ]; - } - - /** - * @inheritDoc - * @return ConfigLexiconEntry[] - */ - public function getUserConfigs(): array { - return [ - new ConfigLexiconEntry('lang', ValueType::STRING, null, 'language'), - ]; - } -} diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php index fb0bf954f57..04ba0e29db0 100644 --- a/lib/private/Config/UserConfig.php +++ b/lib/private/Config/UserConfig.php @@ -11,15 +11,16 @@ namespace OC\Config; use Generator; use InvalidArgumentException; use JsonException; -use NCU\Config\Exceptions\IncorrectTypeException; -use NCU\Config\Exceptions\TypeConflictException; -use NCU\Config\Exceptions\UnknownKeyException; -use NCU\Config\IUserConfig; -use NCU\Config\Lexicon\ConfigLexiconEntry; -use NCU\Config\Lexicon\ConfigLexiconStrictness; -use NCU\Config\Lexicon\Preset; -use NCU\Config\ValueType; use OC\AppFramework\Bootstrap\Coordinator; +use OCP\Config\Exceptions\IncorrectTypeException; +use OCP\Config\Exceptions\TypeConflictException; +use OCP\Config\Exceptions\UnknownKeyException; +use OCP\Config\IUserConfig; +use OCP\Config\Lexicon\Entry; +use OCP\Config\Lexicon\ILexicon; +use OCP\Config\Lexicon\Preset; +use OCP\Config\Lexicon\Strictness; +use OCP\Config\ValueType; use OCP\DB\Exception as DBException; use OCP\DB\IResult; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -64,7 +65,7 @@ class UserConfig implements IUserConfig { private array $fastLoaded = []; /** @var array<string, boolean> ['user_id' => bool] */ private array $lazyLoaded = []; - /** @var array<string, array{entries: array<string, ConfigLexiconEntry>, aliases: array<string, string>, strictness: ConfigLexiconStrictness}> ['app_id' => ['strictness' => ConfigLexiconStrictness, 'entries' => ['config_key' => ConfigLexiconEntry[]]] */ + /** @var array<string, array{entries: array<string, Entry>, aliases: array<string, string>, strictness: Strictness}> ['app_id' => ['strictness' => ConfigLexiconStrictness, 'entries' => ['config_key' => ConfigLexiconEntry[]]] */ private array $configLexiconDetails = []; private bool $ignoreLexiconAliases = false; private ?Preset $configLexiconPreset = null; @@ -1913,7 +1914,7 @@ class UserConfig implements IUserConfig { return true; } - /** @var ConfigLexiconEntry $configValue */ + /** @var Entry $configValue */ $configValue = $configDetails['entries'][$key]; if ($type === ValueType::MIXED) { // we overwrite if value was requested as mixed @@ -1954,7 +1955,7 @@ class UserConfig implements IUserConfig { * * The entry is converted to string to fit the expected type when managing default value */ - private function getSystemDefault(string $appId, ConfigLexiconEntry $configValue): ?string { + private function getSystemDefault(string $appId, Entry $configValue): ?string { $default = $this->config->getSystemValue('lexicon.default.userconfig', [])[$appId][$configValue->getKey()] ?? null; if ($default === null) { // no system default, using default default. @@ -1967,28 +1968,28 @@ class UserConfig implements IUserConfig { /** * manage ConfigLexicon behavior based on strictness set in IConfigLexicon * - * @see IConfigLexicon::getStrictness() - * @param ConfigLexiconStrictness|null $strictness + * @param Strictness|null $strictness * @param string $line * * @return bool TRUE if conflict can be fully ignored * @throws UnknownKeyException + *@see ILexicon::getStrictness() */ - private function applyLexiconStrictness(?ConfigLexiconStrictness $strictness, string $line = ''): bool { + private function applyLexiconStrictness(?Strictness $strictness, string $line = ''): bool { if ($strictness === null) { return true; } switch ($strictness) { - case ConfigLexiconStrictness::IGNORE: + case Strictness::IGNORE: return true; - case ConfigLexiconStrictness::NOTICE: + case Strictness::NOTICE: $this->logger->notice($line); return true; - case ConfigLexiconStrictness::WARNING: + case Strictness::WARNING: $this->logger->warning($line); return false; - case ConfigLexiconStrictness::EXCEPTION: + case Strictness::EXCEPTION: throw new UnknownKeyException($line); } @@ -1999,9 +2000,10 @@ class UserConfig implements IUserConfig { * extract details from registered $appId's config lexicon * * @param string $appId - * @internal * - * @return array{entries: array<string, ConfigLexiconEntry>, aliases: array<string, string>, strictness: ConfigLexiconStrictness} + * @return array{entries: array<string, Entry>, aliases: array<string, string>, strictness: Strictness} + *@internal + * */ public function getConfigDetailsFromLexicon(string $appId): array { if (!array_key_exists($appId, $this->configLexiconDetails)) { @@ -2018,14 +2020,14 @@ class UserConfig implements IUserConfig { $this->configLexiconDetails[$appId] = [ 'entries' => $entries, 'aliases' => $aliases, - 'strictness' => $configLexicon?->getStrictness() ?? ConfigLexiconStrictness::IGNORE + 'strictness' => $configLexicon?->getStrictness() ?? Strictness::IGNORE ]; } return $this->configLexiconDetails[$appId]; } - private function getLexiconEntry(string $appId, string $key): ?ConfigLexiconEntry { + private function getLexiconEntry(string $appId, string $key): ?Entry { return $this->getConfigDetailsFromLexicon($appId)['entries'][$key] ?? null; } diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php index 4d286cb3068..d9b80b81992 100644 --- a/lib/private/DB/ConnectionFactory.php +++ b/lib/private/DB/ConnectionFactory.php @@ -121,21 +121,9 @@ class ConnectionFactory { case 'oci': $eventManager->addEventSubscriber(new OracleSessionInit); - // the driverOptions are unused in dbal and need to be mapped to the parameters - if (isset($connectionParams['driverOptions'])) { - $connectionParams = array_merge($connectionParams, $connectionParams['driverOptions']); - } - $host = $connectionParams['host']; - $port = $connectionParams['port'] ?? null; - $dbName = $connectionParams['dbname']; - - // we set the connect string as dbname and unset the host to coerce doctrine into using it as connect string - if ($host === '') { - $connectionParams['dbname'] = $dbName; // use dbname as easy connect name - } else { - $connectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : '') . '/' . $dbName; - } - unset($connectionParams['host']); + $connectionParams = $this->forceConnectionStringOracle($connectionParams); + $connectionParams['primary'] = $this->forceConnectionStringOracle($connectionParams['primary']); + $connectionParams['replica'] = array_map([$this, 'forceConnectionStringOracle'], $connectionParams['replica']); break; case 'sqlite3': @@ -265,4 +253,24 @@ class ConnectionFactory { return $params; } + + protected function forceConnectionStringOracle(array $connectionParams): array { + // the driverOptions are unused in dbal and need to be mapped to the parameters + if (isset($connectionParams['driverOptions'])) { + $connectionParams = array_merge($connectionParams, $connectionParams['driverOptions']); + } + $host = $connectionParams['host']; + $port = $connectionParams['port'] ?? null; + $dbName = $connectionParams['dbname']; + + // we set the connect string as dbname and unset the host to coerce doctrine into using it as connect string + if ($host === '') { + $connectionParams['dbname'] = $dbName; // use dbname as easy connect name + } else { + $connectionParams['dbname'] = '//' . $host . (!empty($port) ? ":{$port}" : '') . '/' . $dbName; + } + unset($connectionParams['host']); + + return $connectionParams; + } } diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index 7e7adda3d39..c599d9046a6 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -14,6 +14,7 @@ use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudId; use OCP\Federation\ICloudIdManager; +use OCP\Federation\ICloudIdResolver; use OCP\ICache; use OCP\ICacheFactory; use OCP\IURLGenerator; @@ -21,27 +22,19 @@ use OCP\IUserManager; use OCP\User\Events\UserChangedEvent; class CloudIdManager implements ICloudIdManager { - /** @var IManager */ - private $contactsManager; - /** @var IURLGenerator */ - private $urlGenerator; - /** @var IUserManager */ - private $userManager; private ICache $memCache; private ICache $displayNameCache; - /** @var array[] */ private array $cache = []; + /** @var ICloudIdResolver[] */ + private array $cloudIdResolvers = []; public function __construct( - IManager $contactsManager, - IURLGenerator $urlGenerator, - IUserManager $userManager, ICacheFactory $cacheFactory, IEventDispatcher $eventDispatcher, + private IManager $contactsManager, + private IURLGenerator $urlGenerator, + private IUserManager $userManager, ) { - $this->contactsManager = $contactsManager; - $this->urlGenerator = $urlGenerator; - $this->userManager = $userManager; $this->memCache = $cacheFactory->createDistributed('cloud_id_'); $this->displayNameCache = $cacheFactory->createDistributed('cloudid_name_'); $eventDispatcher->addListener(UserChangedEvent::class, [$this, 'handleUserEvent']); @@ -81,6 +74,12 @@ class CloudIdManager implements ICloudIdManager { public function resolveCloudId(string $cloudId): ICloudId { // TODO magic here to get the url and user instead of just splitting on @ + foreach ($this->cloudIdResolvers as $resolver) { + if ($resolver->isValidCloudId($cloudId)) { + return $resolver->resolveCloudId($cloudId); + } + } + if (!$this->isValidCloudId($cloudId)) { throw new \InvalidArgumentException('Invalid cloud id'); } @@ -251,6 +250,26 @@ class CloudIdManager implements ICloudIdManager { * @return bool */ public function isValidCloudId(string $cloudId): bool { - return str_contains($cloudId, '@'); + foreach ($this->cloudIdResolvers as $resolver) { + if ($resolver->isValidCloudId($cloudId)) { + return true; + } + } + + return strpos($cloudId, '@') !== false; + } + + public function createCloudId(string $id, string $user, string $remote, ?string $displayName = null): ICloudId { + return new CloudId($id, $user, $remote, $displayName); + } + + public function registerCloudIdResolver(ICloudIdResolver $resolver): void { + array_unshift($this->cloudIdResolvers, $resolver); + } + + public function unregisterCloudIdResolver(ICloudIdResolver $resolver): void { + if (($key = array_search($resolver, $this->cloudIdResolvers)) !== false) { + array_splice($this->cloudIdResolvers, $key, 1); + } } } diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index 48c069de0b9..8fe56cf060c 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -8,6 +8,7 @@ namespace OC\Files; use OC\Files\Mount\MountPoint; +use OC\Files\Storage\StorageFactory; use OC\User\NoUserException; use OCP\Cache\CappedMemoryCache; use OCP\EventDispatcher\IEventDispatcher; @@ -178,7 +179,9 @@ class Filesystem { } $mounts = self::getMountManager()->getAll(); - if (!self::getLoader()->addStorageWrapper($wrapperName, $wrapper, $priority, $mounts)) { + /** @var StorageFactory $loader */ + $loader = self::getLoader(); + if (!$loader->addStorageWrapper($wrapperName, $wrapper, $priority, $mounts)) { // do not re-wrap if storage with this name already existed return; } diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php index 71a40d8da1e..fd952fae637 100644 --- a/lib/private/Lockdown/Filesystem/NullStorage.php +++ b/lib/private/Lockdown/Filesystem/NullStorage.php @@ -30,7 +30,7 @@ class NullStorage extends Common { } public function opendir(string $path): IteratorDirectory { - return new IteratorDirectory([]); + return new IteratorDirectory(); } public function is_dir(string $path): bool { diff --git a/lib/private/Security/Ip/BruteforceAllowList.php b/lib/private/Security/Ip/BruteforceAllowList.php index cc4f0ceebe5..fb837690a7b 100644 --- a/lib/private/Security/Ip/BruteforceAllowList.php +++ b/lib/private/Security/Ip/BruteforceAllowList.php @@ -36,10 +36,7 @@ class BruteforceAllowList { return false; } - $keys = $this->appConfig->getKeys('bruteForce'); - $keys = array_filter($keys, static fn ($key): bool => str_starts_with($key, 'whitelist_')); - - foreach ($keys as $key) { + foreach ($this->appConfig->searchKeys('bruteForce', 'whitelist_') as $key) { $rangeString = $this->appConfig->getValueString('bruteForce', $key); try { $range = $this->factory->rangeFromString($rangeString); diff --git a/lib/private/Server.php b/lib/private/Server.php index 1e1ba2a1ad3..171fee2afa1 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -8,7 +8,6 @@ namespace OC; use bantu\IniGetWrapper\IniGetWrapper; -use NCU\Config\IUserConfig; use NCU\Security\Signature\ISignatureManager; use OC\Accounts\AccountManager; use OC\App\AppManager; @@ -139,6 +138,7 @@ use OCP\BackgroundJob\IJobList; use OCP\Collaboration\Reference\IReferenceManager; use OCP\Command\IBus; use OCP\Comments\ICommentsManager; +use OCP\Config\IUserConfig; use OCP\Contacts\ContactsMenu\IActionFactory; use OCP\Contacts\ContactsMenu\IContactsStore; use OCP\Defaults; @@ -163,7 +163,6 @@ use OCP\Files\Storage\IStorageFactory; use OCP\Files\Template\ITemplateManager; use OCP\FilesMetadata\IFilesMetadataManager; use OCP\FullTextSearch\IFullTextSearchManager; -use OCP\GlobalScale\IConfig; use OCP\Group\ISubAdmin; use OCP\Http\Client\IClientService; use OCP\IAppConfig; @@ -1161,11 +1160,11 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService(ICloudIdManager::class, function (ContainerInterface $c) { return new CloudIdManager( + $c->get(ICacheFactory::class), + $c->get(IEventDispatcher::class), $c->get(\OCP\Contacts\IManager::class), $c->get(IURLGenerator::class), $c->get(IUserManager::class), - $c->get(ICacheFactory::class), - $c->get(IEventDispatcher::class), ); }); diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php index baff04fbc4a..c55caee6f0a 100644 --- a/lib/private/Share/Constants.php +++ b/lib/private/Share/Constants.php @@ -7,56 +7,7 @@ */ namespace OC\Share; -use OCP\Share\IShare; - class Constants { - /** - * @deprecated 17.0.0 - use IShare::TYPE_USER instead - */ - public const SHARE_TYPE_USER = 0; - /** - * @deprecated 17.0.0 - use IShare::TYPE_GROUP instead - */ - public const SHARE_TYPE_GROUP = 1; - // const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider - /** - * @deprecated 17.0.0 - use IShare::TYPE_LINK instead - */ - public const SHARE_TYPE_LINK = 3; - /** - * @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead - */ - public const SHARE_TYPE_EMAIL = 4; - public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it - /** - * @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead - */ - public const SHARE_TYPE_REMOTE = 6; - /** - * @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead - */ - public const SHARE_TYPE_CIRCLE = 7; - /** - * @deprecated 17.0.0 - use IShare::TYPE_GUEST instead - */ - public const SHARE_TYPE_GUEST = 8; - /** - * @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead - */ - public const SHARE_TYPE_REMOTE_GROUP = 9; - /** - * @deprecated 17.0.0 - use IShare::TYPE_ROOM instead - */ - public const SHARE_TYPE_ROOM = 10; - // const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider - /** - * @deprecated 21.0.0 - use IShare::TYPE_DECK instead - */ - public const SHARE_TYPE_DECK = 12; - // const SHARE_TYPE_DECK_USER = 13; // Internal type used by DeckShareProvider - - // Note to developers: Do not add new share types here - public const FORMAT_NONE = -1; public const FORMAT_STATUSES = -2; public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index e1eebe1e450..5300e6e1baa 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -13,12 +13,14 @@ use OC\Share20\Exception\BackendError; use OC\Share20\Exception\InvalidShare; use OC\Share20\Exception\ProviderException; use OC\User\LazyUser; +use OCA\Files_Sharing\AppInfo\Application; use OCP\AppFramework\Utility\ITimeFactory; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Defaults; use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Node; +use OCP\IConfig; use OCP\IDBConnection; use OCP\IGroupManager; use OCP\IL10N; @@ -43,9 +45,6 @@ use function str_starts_with; * @package OC\Share20 */ class DefaultShareProvider implements IShareProviderWithNotification, IShareProviderSupportsAccept, IShareProviderSupportsAllSharesInFolder { - // Special share type for user modified group shares - public const SHARE_TYPE_USERGROUP = 2; - public function __construct( private IDBConnection $dbConn, private IUserManager $userManager, @@ -58,6 +57,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv private ITimeFactory $timeFactory, private LoggerInterface $logger, private IManager $shareManager, + private IConfig $config, ) { } @@ -127,9 +127,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv $qb->setValue('expiration', $qb->createNamedParameter($expirationDate, 'datetime')); } - if (method_exists($share, 'getParent')) { - $qb->setValue('parent', $qb->createNamedParameter($share->getParent())); - } + $qb->setValue('parent', $qb->createNamedParameter($share->getParent())); $qb->setValue('hide_download', $qb->createNamedParameter($share->getHideDownload() ? 1 : 0, IQueryBuilder::PARAM_INT)); } else { @@ -284,7 +282,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv ->set('expiration', $qb->createNamedParameter($expirationDate, IQueryBuilder::PARAM_DATETIME_MUTABLE)) ->set('note', $qb->createNamedParameter($share->getNote())) ->set('label', $qb->createNamedParameter($share->getLabel())) - ->set('hide_download', $qb->createNamedParameter($share->getHideDownload() ? 1 : 0), IQueryBuilder::PARAM_INT) + ->set('hide_download', $qb->createNamedParameter($share->getHideDownload() ? 1 : 0, IQueryBuilder::PARAM_INT)) ->executeStatement(); } @@ -358,14 +356,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv return $share; } - /** - * Get all children of this share - * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in - * - * @param \OCP\Share\IShare $parent - * @return \OCP\Share\IShare[] - */ - public function getChildren(\OCP\Share\IShare $parent) { + public function getChildren(IShare $parent): array { $children = []; $qb = $this->dbConn->getQueryBuilder(); @@ -485,6 +476,15 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv protected function createUserSpecificGroupShare(IShare $share, string $recipient): int { $type = $share->getNodeType(); + $shareFolder = $this->config->getSystemValue('share_folder', '/'); + $allowCustomShareFolder = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); + if ($allowCustomShareFolder) { + $shareFolder = $this->config->getUserValue($recipient, Application::APP_ID, 'share_folder', $shareFolder); + } + + $target = $shareFolder . '/' . $share->getNode()->getName(); + $target = \OC\Files\Filesystem::normalizePath($target); + $qb = $this->dbConn->getQueryBuilder(); $qb->insert('share') ->values([ @@ -496,7 +496,7 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv 'item_type' => $qb->createNamedParameter($type), 'item_source' => $qb->createNamedParameter($share->getNodeId()), 'file_source' => $qb->createNamedParameter($share->getNodeId()), - 'file_target' => $qb->createNamedParameter($share->getTarget()), + 'file_target' => $qb->createNamedParameter($target), 'permissions' => $qb->createNamedParameter($share->getPermissions()), 'stime' => $qb->createNamedParameter($share->getShareTime()->getTimestamp()), ])->executeStatement(); diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php index 3bce0b9560a..d54c8e3203d 100644 --- a/lib/private/Share20/LegacyHooks.php +++ b/lib/private/Share20/LegacyHooks.php @@ -82,7 +82,7 @@ class LegacyHooks { 'itemSource' => $share->getNodeId(), 'shareType' => $shareType, 'shareWith' => $sharedWith, - 'itemparent' => method_exists($share, 'getParent') ? $share->getParent() : '', + 'itemparent' => $share->getParent(), 'uidOwner' => $share->getSharedBy(), 'fileSource' => $share->getNodeId(), 'fileTarget' => $share->getTarget() diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 01664c6a0a3..855bb173d56 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -7,11 +7,13 @@ */ namespace OC\Share20; +use OC\Core\AppInfo\ConfigLexicon; use OC\Files\Mount\MoveableMount; use OC\KnownUser\KnownUserService; use OC\Share20\Exception\ProviderException; use OCA\Files_Sharing\AppInfo\Application; use OCA\Files_Sharing\SharedStorage; +use OCA\ShareByMail\ShareByMailProvider; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\File; use OCP\Files\Folder; @@ -579,13 +581,10 @@ class Manager implements IManager { * @param IShare $share */ protected function setLinkParent(IShare $share) { - // No sense in checking if the method is not there. - if (method_exists($share, 'setParent')) { - $storage = $share->getNode()->getStorage(); - if ($storage->instanceOfStorage(SharedStorage::class)) { - /** @var \OCA\Files_Sharing\SharedStorage $storage */ - $share->setParent($storage->getShareId()); - } + $storage = $share->getNode()->getStorage(); + if ($storage->instanceOfStorage(SharedStorage::class)) { + /** @var \OCA\Files_Sharing\SharedStorage $storage */ + $share->setParent((int)$storage->getShareId()); } } @@ -704,12 +703,12 @@ class Manager implements IManager { } // Generate the target - $defaultShareFolder = $this->config->getSystemValue('share_folder', '/'); - $allowCustomShareFolder = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); - if ($allowCustomShareFolder) { - $shareFolder = $this->config->getUserValue($share->getSharedWith(), Application::APP_ID, 'share_folder', $defaultShareFolder); - } else { - $shareFolder = $defaultShareFolder; + $shareFolder = $this->config->getSystemValue('share_folder', '/'); + if ($share->getShareType() === IShare::TYPE_USER) { + $allowCustomShareFolder = $this->config->getSystemValueBool('sharing.allow_custom_share_folder', true); + if ($allowCustomShareFolder) { + $shareFolder = $this->config->getUserValue($share->getSharedWith(), Application::APP_ID, 'share_folder', $shareFolder); + } } $target = $shareFolder . '/' . $share->getNode()->getName(); @@ -869,6 +868,7 @@ class Manager implements IManager { // Now update the share! $provider = $this->factory->getProviderForType($share->getShareType()); if ($share->getShareType() === IShare::TYPE_EMAIL) { + /** @var ShareByMailProvider $provider */ $share = $provider->update($share, $plainTextPassword); } else { $share = $provider->update($share); @@ -1006,7 +1006,6 @@ class Manager implements IManager { /** * Delete all the children of this share - * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in * * @param IShare $share * @return IShare[] List of deleted shares @@ -1937,7 +1936,7 @@ class Manager implements IManager { } public function allowCustomTokens(): bool { - return $this->appConfig->getValueBool('core', 'shareapi_allow_custom_tokens', false); + return $this->appConfig->getValueBool('core', ConfigLexicon::SHARE_CUSTOM_TOKEN); } public function allowViewWithoutDownload(): bool { diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 8caabb0898a..571efc8c4be 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -60,8 +60,7 @@ class Share implements IShare { private $sendPasswordByTalk = false; /** @var string */ private $token; - /** @var int */ - private $parent; + private ?int $parent = null; /** @var string */ private $target; /** @var \DateTime */ @@ -526,25 +525,12 @@ class Share implements IShare { return $this->token; } - /** - * Set the parent of this share - * - * @param int $parent - * @return IShare - * @deprecated 12.0.0 The new shares do not have parents. This is just here for legacy reasons. - */ - public function setParent($parent) { + public function setParent(int $parent): self { $this->parent = $parent; return $this; } - /** - * Get the parent of this share. - * - * @return int - * @deprecated 12.0.0 The new shares do not have parents. This is just here for legacy reasons. - */ - public function getParent() { + public function getParent(): ?int { return $this->parent; } diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index de9df04ae4b..07e557d0706 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -70,6 +70,8 @@ class JSConfigHelper { $userBackendAllowsPasswordConfirmation = $backend->canConfirmPassword($uid) && $this->canUserValidatePassword(); } elseif (isset($this->excludedUserBackEnds[$this->currentUser->getBackendClassName()])) { $userBackendAllowsPasswordConfirmation = false; + } else { + $userBackendAllowsPasswordConfirmation = $this->canUserValidatePassword(); } } else { $uid = null; diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 6495bad2da2..9cd33863612 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -385,6 +385,13 @@ class Updater extends BasicEmitter { if ($this->installer->isUpdateAvailable($app)) { $this->emit('\OC\Updater', 'upgradeAppStoreApp', [$app]); $this->installer->updateAppstoreApp($app); + } elseif (!empty($previousEnableStates)) { + /** + * When updating a local app we still need to run updateApp + * so that repair steps and migrations are correctly executed + * Ref: https://github.com/nextcloud/server/issues/53985 + */ + \OC_App::updateApp($app); } $this->emit('\OC\Updater', 'checkAppStoreApp', [$app]); diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 011d1520414..70b35228c87 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -443,7 +443,7 @@ interface IRegistrationContext { * * @param string $configLexiconClass * - * @psalm-param class-string<\NCU\Config\Lexicon\IConfigLexicon> $configLexiconClass + * @psalm-param class-string<\OCP\Config\Lexicon\ILexicon> $configLexiconClass * @since 31.0.0 */ public function registerConfigLexicon(string $configLexiconClass): void; diff --git a/lib/public/Config/BeforePreferenceDeletedEvent.php b/lib/public/Config/BeforePreferenceDeletedEvent.php index c7026b0f6fc..df89a2900bd 100644 --- a/lib/public/Config/BeforePreferenceDeletedEvent.php +++ b/lib/public/Config/BeforePreferenceDeletedEvent.php @@ -8,11 +8,10 @@ declare(strict_types=1); namespace OCP\Config; +use OCP\AppFramework\Attribute\Listenable; use OCP\EventDispatcher\Event; -/** - * @since 25.0.0 - */ +#[Listenable(since: '25.0.0')] class BeforePreferenceDeletedEvent extends Event { protected string $userId; protected string $appId; diff --git a/lib/public/Config/BeforePreferenceSetEvent.php b/lib/public/Config/BeforePreferenceSetEvent.php index c5abb8429a8..6534e4ae371 100644 --- a/lib/public/Config/BeforePreferenceSetEvent.php +++ b/lib/public/Config/BeforePreferenceSetEvent.php @@ -8,11 +8,10 @@ declare(strict_types=1); namespace OCP\Config; +use OCP\AppFramework\Attribute\Listenable; use OCP\EventDispatcher\Event; -/** - * @since 25.0.0 - */ +#[Listenable(since: '25.0.0')] class BeforePreferenceSetEvent extends Event { protected string $userId; protected string $appId; diff --git a/lib/public/Config/Exceptions/IncorrectTypeException.php b/lib/public/Config/Exceptions/IncorrectTypeException.php new file mode 100644 index 00000000000..dea33233bfe --- /dev/null +++ b/lib/public/Config/Exceptions/IncorrectTypeException.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config\Exceptions; + +use Exception; +use OCP\AppFramework\Attribute\Throwable; + +#[Throwable(since: '32.0.0')] +class IncorrectTypeException extends Exception { +} diff --git a/lib/public/Config/Exceptions/TypeConflictException.php b/lib/public/Config/Exceptions/TypeConflictException.php new file mode 100644 index 00000000000..c78602180e0 --- /dev/null +++ b/lib/public/Config/Exceptions/TypeConflictException.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config\Exceptions; + +use Exception; +use OCP\AppFramework\Attribute\Throwable; + +#[Throwable(since: '32.0.0')] +class TypeConflictException extends Exception { +} diff --git a/lib/public/Config/Exceptions/UnknownKeyException.php b/lib/public/Config/Exceptions/UnknownKeyException.php new file mode 100644 index 00000000000..beca4c496a2 --- /dev/null +++ b/lib/public/Config/Exceptions/UnknownKeyException.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config\Exceptions; + +use Exception; +use OCP\AppFramework\Attribute\Throwable; + +#[Throwable(since: '32.0.0')] +class UnknownKeyException extends Exception { +} diff --git a/lib/public/Config/IUserConfig.php b/lib/public/Config/IUserConfig.php new file mode 100644 index 00000000000..cb42608ea75 --- /dev/null +++ b/lib/public/Config/IUserConfig.php @@ -0,0 +1,742 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config; + +use Generator; +use OCP\AppFramework\Attribute\Consumable; +use OCP\Config\Exceptions\IncorrectTypeException; +use OCP\Config\Exceptions\UnknownKeyException; + +/** + * This class provides an easy way for apps to store user config in the + * database. + * Supports **lazy loading** + * + * ### What is lazy loading ? + * In order to avoid loading useless user config into memory for each request, + * only non-lazy values are now loaded. + * + * Once a value that is lazy is requested, all lazy values will be loaded. + * + * Similarly, some methods from this class are marked with a warning about ignoring + * lazy loading. Use them wisely and only on parts of the code that are called + * during specific requests or actions to avoid loading the lazy values all the time. + */ +#[Consumable(since: '32.0.0')] +interface IUserConfig { + /** + * @since 32.0.0 + */ + public const FLAG_SENSITIVE = 1; // value is sensitive + /** + * @since 32.0.0 + */ + public const FLAG_INDEXED = 2; // value should be indexed + + /** + * Get list of all userIds with config stored in database. + * If $appId is specified, will only limit the search to this value + * + * **WARNING:** ignore any cache and get data directly from database. + * + * @param string $appId optional id of app + * + * @return list<string> list of userIds + * + * @since 32.0.0 + */ + public function getUserIds(string $appId = ''): array; + + /** + * Get list of all apps that have at least one config + * value related to $userId stored in database + * + * **WARNING:** ignore lazy filtering, all user config are loaded from database + * + * @param string $userId id of the user + * + * @return list<string> list of app ids + * + * @since 32.0.0 + */ + public function getApps(string $userId): array; + + /** + * Returns all keys stored in database, related to user+app. + * Please note that the values are not returned. + * + * **WARNING:** ignore lazy filtering, all user config are loaded from database + * + * @param string $userId id of the user + * @param string $app id of the app + * + * @return list<string> list of stored config keys + * + * @since 32.0.0 + */ + public function getKeys(string $userId, string $app): array; + + /** + * Check if a key exists in the list of stored config values. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $lazy search within lazy loaded config + * + * @return bool TRUE if key exists + * + * @since 32.0.0 + */ + public function hasKey(string $userId, string $app, string $key, ?bool $lazy = false): bool; + + /** + * best way to see if a value is set as sensitive (not displayed in report) + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool|null $lazy search within lazy loaded config + * + * @return bool TRUE if value is sensitive + * @throws UnknownKeyException if config key is not known + * + * @since 32.0.0 + */ + public function isSensitive(string $userId, string $app, string $key, ?bool $lazy = false): bool; + + /** + * best way to see if a value is set as indexed (so it can be search) + * + * @see self::searchUsersByValueString() + * @see self::searchUsersByValueInt() + * @see self::searchUsersByValueBool() + * @see self::searchUsersByValues() + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool|null $lazy search within lazy loaded config + * + * @return bool TRUE if value is sensitive + * @throws UnknownKeyException if config key is not known + * + * @since 32.0.0 + */ + public function isIndexed(string $userId, string $app, string $key, ?bool $lazy = false): bool; + + /** + * Returns if the config key stored in database is lazy loaded + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * + * @return bool TRUE if config is lazy loaded + * @throws UnknownKeyException if config key is not known + * @see IUserConfig for details about lazy loading + * + * @since 32.0.0 + */ + public function isLazy(string $userId, string $app, string $key): bool; + + /** + * List all config values from an app with config key starting with $key. + * Returns an array with config key as key, stored value as value. + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $prefix config keys prefix to search, can be empty. + * @param bool $filtered filter sensitive config values + * + * @return array<string, string|int|float|bool|array> [key => value] + * + * @since 32.0.0 + */ + public function getValues(string $userId, string $app, string $prefix = '', bool $filtered = false): array; + + /** + * List all config values of a user. + * Returns an array with config key as key, stored value as value. + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * + * @param string $userId id of the user + * @param bool $filtered filter sensitive config values + * + * @return array<string, string|int|float|bool|array> [key => value] + * + * @since 32.0.0 + */ + public function getAllValues(string $userId, bool $filtered = false): array; + + /** + * List all apps storing a specific config key and its stored value. + * Returns an array with appId as key, stored value as value. + * + * @param string $userId id of the user + * @param string $key config key + * @param bool $lazy search within lazy loaded config + * @param ValueType|null $typedAs enforce type for the returned values + * + * @return array<string, string|int|float|bool|array> [appId => value] + * + * @since 32.0.0 + */ + public function getValuesByApps(string $userId, string $key, bool $lazy = false, ?ValueType $typedAs = null): array; + + /** + * List all users storing a specific config key and its stored value. + * Returns an array with userId as key, stored value as value. + * + * **WARNING:** no caching, generate a fresh request + * + * @param string $app id of the app + * @param string $key config key + * @param ValueType|null $typedAs enforce type for the returned values + * @param array|null $userIds limit the search to a list of user ids + * + * @return array<string, string|int|float|bool|array> [userId => value] + * + * @since 32.0.0 + */ + public function getValuesByUsers(string $app, string $key, ?ValueType $typedAs = null, ?array $userIds = null): array; + + /** + * List all users storing a specific config key/value pair. + * Returns a list of user ids. + * + * **WARNING:** no caching, generate a fresh request + * + * @param string $app id of the app + * @param string $key config key + * @param string $value config value + * @param bool $caseInsensitive non-case-sensitive search, only works if $value is a string + * + * @return Generator<string> + * + * @since 32.0.0 + */ + public function searchUsersByValueString(string $app, string $key, string $value, bool $caseInsensitive = false): Generator; + + /** + * List all users storing a specific config key/value pair. + * Returns a list of user ids. + * + * **WARNING:** no caching, generate a fresh request + * + * @param string $app id of the app + * @param string $key config key + * @param int $value config value + * + * @return Generator<string> + * + * @since 32.0.0 + */ + public function searchUsersByValueInt(string $app, string $key, int $value): Generator; + + /** + * List all users storing a specific config key/value pair. + * Returns a list of user ids. + * + * **WARNING:** no caching, generate a fresh request + * + * @param string $app id of the app + * @param string $key config key + * @param array $values list of possible config values + * + * @return Generator<string> + * + * @since 32.0.0 + */ + public function searchUsersByValues(string $app, string $key, array $values): Generator; + + /** + * List all users storing a specific config key/value pair. + * Returns a list of user ids. + * + * **WARNING:** no caching, generate a fresh request + * + * @param string $app id of the app + * @param string $key config key + * @param bool $value config value + * + * @return Generator<string> + * + * @since 32.0.0 + */ + public function searchUsersByValueBool(string $app, string $key, bool $value): Generator; + + /** + * Get user config assigned to a config key. + * If config key is not found in database, default value is returned. + * If config key is set as lazy loaded, the $lazy argument needs to be set to TRUE. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param string $default default value + * @param bool $lazy search within lazy loaded config + * + * @return string stored config value or $default if not set in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see getValueInt() + * @see getValueFloat() + * @see getValueBool() + * @see getValueArray() + */ + public function getValueString(string $userId, string $app, string $key, string $default = '', bool $lazy = false): string; + + /** + * Get config value assigned to a config key. + * If config key is not found in database, default value is returned. + * If config key is set as lazy loaded, the $lazy argument needs to be set to TRUE. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param int $default default value + * @param bool $lazy search within lazy loaded config + * + * @return int stored config value or $default if not set in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see getValueString() + * @see getValueFloat() + * @see getValueBool() + * @see getValueArray() + */ + public function getValueInt(string $userId, string $app, string $key, int $default = 0, bool $lazy = false): int; + + /** + * Get config value assigned to a config key. + * If config key is not found in database, default value is returned. + * If config key is set as lazy loaded, the $lazy argument needs to be set to TRUE. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param float $default default value + * @param bool $lazy search within lazy loaded config + * + * @return float stored config value or $default if not set in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see getValueString() + * @see getValueInt() + * @see getValueBool() + * @see getValueArray() + */ + public function getValueFloat(string $userId, string $app, string $key, float $default = 0, bool $lazy = false): float; + + /** + * Get config value assigned to a config key. + * If config key is not found in database, default value is returned. + * If config key is set as lazy loaded, the $lazy argument needs to be set to TRUE. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $default default value + * @param bool $lazy search within lazy loaded config + * + * @return bool stored config value or $default if not set in database + * + * @since 32.0.0 + * + * @see IUserPrefences for explanation about lazy loading + * @see getValueString() + * @see getValueInt() + * @see getValueFloat() + * @see getValueArray() + */ + public function getValueBool(string $userId, string $app, string $key, bool $default = false, bool $lazy = false): bool; + + /** + * Get config value assigned to a config key. + * If config key is not found in database, default value is returned. + * If config key is set as lazy loaded, the $lazy argument needs to be set to TRUE. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param array $default default value` + * @param bool $lazy search within lazy loaded config + * + * @return array stored config value or $default if not set in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see getValueString() + * @see getValueInt() + * @see getValueFloat() + * @see getValueBool() + */ + public function getValueArray(string $userId, string $app, string $key, array $default = [], bool $lazy = false): array; + + /** + * returns the type of config value + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * unless lazy is set to false + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool|null $lazy + * + * @return ValueType type of the value + * @throws UnknownKeyException if config key is not known + * @throws IncorrectTypeException if config value type is not known + * + * @since 32.0.0 + */ + public function getValueType(string $userId, string $app, string $key, ?bool $lazy = null): ValueType; + + /** + * returns a bitflag related to config value + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * unless lazy is set to false + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $lazy lazy loading + * + * @return int a bitflag in relation to the config value + * @throws UnknownKeyException if config key is not known + * @throws IncorrectTypeException if config value type is not known + * + * @since 32.0.0 + */ + public function getValueFlags(string $userId, string $app, string $key, bool $lazy = false): int; + + /** + * Store a config key and its value in database + * + * If config key is already known with the exact same config value, the database is not updated. + * If config key is not supposed to be read during the boot of the cloud, it is advised to set it as lazy loaded. + * + * If config value was previously stored as sensitive or lazy loaded, status cannot be altered without using {@see deleteKey()} first + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param string $value config value + * @param bool $sensitive if TRUE value will be hidden when listing config values. + * @param bool $lazy set config as lazy loaded + * + * @return bool TRUE if value was different, therefor updated in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see setValueInt() + * @see setValueFloat() + * @see setValueBool() + * @see setValueArray() + */ + public function setValueString(string $userId, string $app, string $key, string $value, bool $lazy = false, int $flags = 0): bool; + + /** + * Store a config key and its value in database + * + * When handling huge value around and/or above 2,147,483,647, a debug log will be generated + * on 64bits system, as php int type reach its limit (and throw an exception) on 32bits when using huge numbers. + * + * When using huge numbers, it is advised to use {@see \OCP\Util::numericToNumber()} and {@see setValueString()} + * + * If config key is already known with the exact same config value, the database is not updated. + * If config key is not supposed to be read during the boot of the cloud, it is advised to set it as lazy loaded. + * + * If config value was previously stored as sensitive or lazy loaded, status cannot be altered without using {@see deleteKey()} first + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param int $value config value + * @param bool $sensitive if TRUE value will be hidden when listing config values. + * @param bool $lazy set config as lazy loaded + * + * @return bool TRUE if value was different, therefor updated in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see setValueString() + * @see setValueFloat() + * @see setValueBool() + * @see setValueArray() + */ + public function setValueInt(string $userId, string $app, string $key, int $value, bool $lazy = false, int $flags = 0): bool; + + /** + * Store a config key and its value in database. + * + * If config key is already known with the exact same config value, the database is not updated. + * If config key is not supposed to be read during the boot of the cloud, it is advised to set it as lazy loaded. + * + * If config value was previously stored as sensitive or lazy loaded, status cannot be altered without using {@see deleteKey()} first + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param float $value config value + * @param bool $sensitive if TRUE value will be hidden when listing config values. + * @param bool $lazy set config as lazy loaded + * + * @return bool TRUE if value was different, therefor updated in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see setValueString() + * @see setValueInt() + * @see setValueBool() + * @see setValueArray() + */ + public function setValueFloat(string $userId, string $app, string $key, float $value, bool $lazy = false, int $flags = 0): bool; + + /** + * Store a config key and its value in database + * + * If config key is already known with the exact same config value, the database is not updated. + * If config key is not supposed to be read during the boot of the cloud, it is advised to set it as lazy loaded. + * + * If config value was previously stored as lazy loaded, status cannot be altered without using {@see deleteKey()} first + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $value config value + * @param bool $lazy set config as lazy loaded + * + * @return bool TRUE if value was different, therefor updated in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see setValueString() + * @see setValueInt() + * @see setValueFloat() + * @see setValueArray() + */ + public function setValueBool(string $userId, string $app, string $key, bool $value, bool $lazy = false): bool; + + /** + * Store a config key and its value in database + * + * If config key is already known with the exact same config value, the database is not updated. + * If config key is not supposed to be read during the boot of the cloud, it is advised to set it as lazy loaded. + * + * If config value was previously stored as sensitive or lazy loaded, status cannot be altered without using {@see deleteKey()} first + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param array $value config value + * @param bool $sensitive if TRUE value will be hidden when listing config values. + * @param bool $lazy set config as lazy loaded + * + * @return bool TRUE if value was different, therefor updated in database + * + * @since 32.0.0 + * + * @see IUserConfig for explanation about lazy loading + * @see setValueString() + * @see setValueInt() + * @see setValueFloat() + * @see setValueBool() + */ + public function setValueArray(string $userId, string $app, string $key, array $value, bool $lazy = false, int $flags = 0): bool; + + /** + * switch sensitive status of a config value + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $sensitive TRUE to set as sensitive, FALSE to unset + * + * @return bool TRUE if database update were necessary + * + * @since 32.0.0 + */ + public function updateSensitive(string $userId, string $app, string $key, bool $sensitive): bool; + + /** + * switch sensitive loading status of a config key for all users + * + * **Warning:** heavy on resources, MUST only be used on occ command or migrations + * + * @param string $app id of the app + * @param string $key config key + * @param bool $sensitive TRUE to set as sensitive, FALSE to unset + * + * @since 32.0.0 + */ + public function updateGlobalSensitive(string $app, string $key, bool $sensitive): void; + + + /** + * switch indexed status of a config value + * + * **WARNING:** ignore lazy filtering, all config values are loaded from database + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $indexed TRUE to set as indexed, FALSE to unset + * + * @return bool TRUE if database update were necessary + * + * @since 32.0.0 + */ + public function updateIndexed(string $userId, string $app, string $key, bool $indexed): bool; + + /** + * switch sensitive loading status of a config key for all users + * + * **Warning:** heavy on resources, MUST only be used on occ command or migrations + * + * @param string $app id of the app + * @param string $key config key + * @param bool $indexed TRUE to set as indexed, FALSE to unset + * + * @since 32.0.0 + */ + public function updateGlobalIndexed(string $app, string $key, bool $indexed): void; + + /** + * switch lazy loading status of a config value + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * @param bool $lazy TRUE to set as lazy loaded, FALSE to unset + * + * @return bool TRUE if database update was necessary + * + * @since 32.0.0 + */ + public function updateLazy(string $userId, string $app, string $key, bool $lazy): bool; + + /** + * switch lazy loading status of a config key for all users + * + * **Warning:** heavy on resources, MUST only be used on occ command or migrations + * + * @param string $app id of the app + * @param string $key config key + * @param bool $lazy TRUE to set as lazy loaded, FALSE to unset + * + * @since 32.0.0 + */ + public function updateGlobalLazy(string $app, string $key, bool $lazy): void; + + /** + * returns an array contains details about a config value + * + * ``` + * [ + * "app" => "myapp", + * "key" => "mykey", + * "value" => "its_value", + * "lazy" => false, + * "type" => 4, + * "typeString" => "string", + * 'sensitive' => true + * ] + * ``` + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * + * @return array + * @throws UnknownKeyException if config key is not known in database + * + * @since 32.0.0 + */ + public function getDetails(string $userId, string $app, string $key): array; + + /** + * Delete single config key from database. + * + * @param string $userId id of the user + * @param string $app id of the app + * @param string $key config key + * + * @since 32.0.0 + */ + public function deleteUserConfig(string $userId, string $app, string $key): void; + + /** + * Delete config values from all users linked to a specific config keys + * + * @param string $app id of the app + * @param string $key config key + * + * @since 32.0.0 + */ + public function deleteKey(string $app, string $key): void; + + /** + * delete all config keys linked to an app + * + * @param string $app id of the app + * + * @since 32.0.0 + */ + public function deleteApp(string $app): void; + + /** + * delete all config keys linked to a user + * + * @param string $userId id of the user + * + * @since 32.0.0 + */ + public function deleteAllUserConfig(string $userId): void; + + /** + * Clear the cache for a single user + * + * The cache will be rebuilt only the next time a user config is requested. + * + * @param string $userId id of the user + * @param bool $reload set to TRUE to refill cache instantly after clearing it + * + * @since 32.0.0 + */ + public function clearCache(string $userId, bool $reload = false): void; + + /** + * Clear the cache for all users. + * The cache will be rebuilt only the next time a user config is requested. + * + * @since 32.0.0 + */ + public function clearCacheAll(): void; +} diff --git a/lib/public/Config/Lexicon/Entry.php b/lib/public/Config/Lexicon/Entry.php new file mode 100644 index 00000000000..c810522dde5 --- /dev/null +++ b/lib/public/Config/Lexicon/Entry.php @@ -0,0 +1,266 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config\Lexicon; + +use Closure; +use OCP\AppFramework\Attribute\Consumable; +use OCP\Config\ValueType; + +/** + * Model that represent config values within an app config lexicon. + * + * @see ILexicon + */ +#[Consumable(since: '32.0.0')] +class Entry { + /** @since 32.0.0 */ + public const RENAME_INVERT_BOOLEAN = 1; + + private string $definition = ''; + private string $note = ''; + private ?string $default = null; + + /** + * @param string $key config key; can only contain alphanumerical chars and underscore "_" + * @param ValueType $type type of config value + * @param string|int|float|bool|array|Closure|null $defaultRaw default value to be used in case none known + * @param string $definition optional description of config key available when using occ command + * @param bool $lazy set config value as lazy + * @param int $flags set flags + * @param bool $deprecated set config key as deprecated + * @param string|null $rename source in case of a rename of a config key. + * @param int $options additional bitflag options {@see self::RENAME_INVERT_BOOLEAN} + * @param string $note additional note and warning related to the use of the config key. + * + * @since 32.0.0 + * @psalm-suppress PossiblyInvalidCast + * @psalm-suppress RiskyCast + */ + public function __construct( + private readonly string $key, + private readonly ValueType $type, + private null|string|int|float|bool|array|Closure $defaultRaw = null, + string $definition = '', + private readonly bool $lazy = false, + private readonly int $flags = 0, + private readonly bool $deprecated = false, + private readonly ?string $rename = null, + private readonly int $options = 0, + string $note = '', + ) { + // key can only contain alphanumeric chars and underscore "_" + if (preg_match('/[^[:alnum:]_]/', $key)) { + throw new \Exception('invalid config key'); + } + + /** @psalm-suppress UndefinedClass */ + if (\OC::$CLI) { // only store definition if ran from CLI + $this->definition = $definition; + $this->note = $note; + } + } + + /** + * returns the config key + * + * @return string config key + * @since 32.0.0 + */ + public function getKey(): string { + return $this->key; + } + + /** + * get expected type for config value + * + * @return ValueType + * @since 32.0.0 + */ + public function getValueType(): ValueType { + return $this->type; + } + + /** + * @param string $default + * @return string + * @since 32.0.0 + */ + private function convertFromString(string $default): string { + return $default; + } + + /** + * @param int $default + * @return string + * @since 32.0.0 + */ + private function convertFromInt(int $default): string { + return (string)$default; + } + + /** + * @param float $default + * @return string + * @since 32.0.0 + */ + private function convertFromFloat(float $default): string { + return (string)$default; + } + + /** + * @param bool $default + * @return string + * @since 32.0.0 + */ + private function convertFromBool(bool $default): string { + return ($default) ? '1' : '0'; + } + + /** + * @param array $default + * @return string + * @since 32.0.0 + */ + private function convertFromArray(array $default): string { + return json_encode($default); + } + + /** + * returns default value + * + * @return string|null NULL if no default is set + * @since 32.0.0 + */ + public function getDefault(Preset $preset): ?string { + if ($this->default !== null) { + return $this->default; + } + + if ($this->defaultRaw === null) { + return null; + } + + if ($this->defaultRaw instanceof Closure) { + /** @psalm-suppress MixedAssignment we expect closure to returns string|int|float|bool|array */ + $this->defaultRaw = ($this->defaultRaw)($preset); + } + + /** @psalm-suppress MixedArgument closure should be managed previously */ + $this->default = $this->convertToString($this->defaultRaw); + + return $this->default; + } + + /** + * convert $entry into string, based on the expected type for config value + * + * @param string|int|float|bool|array $entry + * + * @return string + * @since 32.0.0 + * @psalm-suppress PossiblyInvalidCast arrays are managed pre-cast + * @psalm-suppress RiskyCast + */ + public function convertToString(string|int|float|bool|array $entry): string { + // in case $default is array but is not expected to be an array... + if ($this->getValueType() !== ValueType::ARRAY && is_array($entry)) { + $entry = json_encode($entry, JSON_THROW_ON_ERROR); + } + + return match ($this->getValueType()) { + ValueType::MIXED => (string)$entry, + ValueType::STRING => $this->convertFromString((string)$entry), + ValueType::INT => $this->convertFromInt((int)$entry), + ValueType::FLOAT => $this->convertFromFloat((float)$entry), + ValueType::BOOL => $this->convertFromBool((bool)$entry), + ValueType::ARRAY => $this->convertFromArray((array)$entry) + }; + } + + /** + * returns definition + * + * @return string + * @since 32.0.0 + */ + public function getDefinition(): string { + return $this->definition; + } + + /** + * returns eventual note + * + * @return string + * @since 32.0.0 + */ + public function getNote(): string { + return $this->note; + } + + /** + * returns if config key is set as lazy + * + * @see IAppConfig for details on lazy config values + * @return bool TRUE if config value is lazy + * @since 32.0.0 + */ + public function isLazy(): bool { + return $this->lazy; + } + + /** + * returns flags + * + * @see IAppConfig for details on sensitive config values + * @return int bitflag about the config value + * @since 32.0.0 + */ + public function getFlags(): int { + return $this->flags; + } + + /** + * @param int $flag + * + * @return bool TRUE is config value bitflag contains $flag + * @since 32.0.0 + */ + public function isFlagged(int $flag): bool { + return (($flag & $this->getFlags()) === $flag); + } + + /** + * should be called/used only during migration/upgrade. + * link to an old config key. + * + * @return string|null not NULL if value can be imported from a previous key + * @since 32.0.0 + */ + public function getRename(): ?string { + return $this->rename; + } + + /** + * @since 32.0.0 + * @return bool TRUE if $option was set during the creation of the entry. + */ + public function hasOption(int $option): bool { + return (($option & $this->options) !== 0); + } + + /** + * returns if config key is set as deprecated + * + * @return bool TRUE if config si deprecated + * @since 32.0.0 + */ + public function isDeprecated(): bool { + return $this->deprecated; + } +} diff --git a/lib/public/Config/Lexicon/ILexicon.php b/lib/public/Config/Lexicon/ILexicon.php new file mode 100644 index 00000000000..05bf5967f24 --- /dev/null +++ b/lib/public/Config/Lexicon/ILexicon.php @@ -0,0 +1,45 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +namespace OCP\Config\Lexicon; + +use OCP\AppFramework\Attribute\Implementable; + +/** + * This interface needs to be implemented if you want to define a config lexicon for your application + * The config lexicon is used to avoid conflicts and problems when storing/retrieving config values + */ +#[Implementable(since: '32.0.0')] +interface ILexicon { + + /** + * Define the expected behavior when using config + * keys not set within your application config lexicon. + * + * @return Strictness + * @since 32.0.0 + *@see Strictness + */ + public function getStrictness(): Strictness; + + /** + * define the list of entries of your application config lexicon, related to AppConfig. + * + * @return Entry[] + * @since 32.0.0 + */ + public function getAppConfigs(): array; + + /** + * define the list of entries of your application config lexicon, related to UserPreferences. + * + * @return Entry[] + * @since 32.0.0 + */ + public function getUserConfigs(): array; +} diff --git a/lib/public/Config/Lexicon/Preset.php b/lib/public/Config/Lexicon/Preset.php new file mode 100644 index 00000000000..6dac8736131 --- /dev/null +++ b/lib/public/Config/Lexicon/Preset.php @@ -0,0 +1,50 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +namespace OCP\Config\Lexicon; + +use OCP\AppFramework\Attribute\Consumable; + +/** + * list of preset to handle the default behavior of the instance + * + * @see Entry::preset + * + * - **Preset::LARGE** - Large size organisation (> 50k accounts) + * - **Preset::MEDIUM** - Medium size organisation (> 100 accounts) + * - **Preset::SMALL** - Small size organisation (< 100 accounts) + * - **Preset::SHARED** - Shared hosting + * - **Preset::UNIVERSITY** - Education, large size + * - **Preset::SCHOOL** - Eduction, small/medium size + * - **Preset::CLUB** - Club/Association + * - **Preset::FAMILY** - Family + * - **Preset::PRIVATE** - Private + */ +#[Consumable(since: '32.0.0')] +enum Preset: int { + /** @since 32.0.0 */ + case LARGE = 9; + /** @since 32.0.0 */ + case MEDIUM = 8; + /** @since 32.0.0 */ + case SMALL = 7; + /** @since 32.0.0 */ + case SHARED = 6; + /** @since 32.0.0 */ + case UNIVERSITY = 5; + /** @since 32.0.0 */ + case SCHOOL = 4; + /** @since 32.0.0 */ + case CLUB = 3; + /** @since 32.0.0 */ + case FAMILY = 2; + /** @since 32.0.0 */ + case PRIVATE = 1; + /** @since 32.0.0 */ + case NONE = 0; +} diff --git a/lib/public/Config/Lexicon/Strictness.php b/lib/public/Config/Lexicon/Strictness.php new file mode 100644 index 00000000000..8136499cb3e --- /dev/null +++ b/lib/public/Config/Lexicon/Strictness.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +namespace OCP\Config\Lexicon; + +use OCP\AppFramework\Attribute\Consumable; + +/** + * Strictness regarding using not-listed config keys + * + * - **Strictness::IGNORE** - fully ignore + * - **Strictness::NOTICE** - ignore and report + * - **Strictness::WARNING** - silently block (returns $default) and report + * - **Strictness::EXCEPTION** - block (throws exception) and report + */ +#[Consumable(since: '32.0.0')] +enum Strictness { + /** @since 32.0.0 */ + case IGNORE; // fully ignore + /** @since 32.0.0 */ + case NOTICE; // ignore and report + /** @since 32.0.0 */ + case WARNING; // silently block (returns $default) and report + /** @since 32.0.0 */ + case EXCEPTION; // block (throws exception) and report +} diff --git a/lib/public/Config/ValueType.php b/lib/public/Config/ValueType.php new file mode 100644 index 00000000000..32c734af32b --- /dev/null +++ b/lib/public/Config/ValueType.php @@ -0,0 +1,117 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config; + +use OCP\AppFramework\Attribute\Consumable; +use OCP\Config\Exceptions\IncorrectTypeException; +use OCP\IAppConfig; +use UnhandledMatchError; + +/** + * Listing of available value type for typed config value + */ +#[Consumable(since: '32.0.0')] +enum ValueType: int { + /** + * @since 32.0.0 + */ + case MIXED = 0; + /** + * @since 32.0.0 + */ + case STRING = 1; + /** + * @since 32.0.0 + */ + case INT = 2; + /** + * @since 32.0.0 + */ + case FLOAT = 3; + /** + * @since 32.0.0 + */ + case BOOL = 4; + /** + * @since 32.0.0 + */ + case ARRAY = 5; + + /** + * get ValueType from string + * + * @param string $definition + * + * @return self + * @throws IncorrectTypeException + * + * @since 32.0.0 + */ + public static function fromStringDefinition(string $definition): self { + try { + return match ($definition) { + 'mixed' => self::MIXED, + 'string' => self::STRING, + 'int' => self::INT, + 'float' => self::FLOAT, + 'bool' => self::BOOL, + 'array' => self::ARRAY + }; + } catch (\UnhandledMatchError) { + throw new IncorrectTypeException('unknown string definition'); + } + } + + /** + * get string definition for current enum value + * + * @return string + * @throws IncorrectTypeException + * + * @since 32.0.0 + */ + public function getDefinition(): string { + try { + return match ($this) { + self::MIXED => 'mixed', + self::STRING => 'string', + self::INT => 'int', + self::FLOAT => 'float', + self::BOOL => 'bool', + self::ARRAY => 'array', + }; + } catch (UnhandledMatchError) { + throw new IncorrectTypeException('unknown type definition ' . $this->value); + } + } + + /** + * get corresponding AppConfig flag value + * + * @return int + * @throws IncorrectTypeException + * + * @since 32.0.0 + */ + public function toAppConfigFlag(): int { + try { + return match ($this) { + self::MIXED => IAppConfig::VALUE_MIXED, + self::STRING => IAppConfig::VALUE_STRING, + self::INT => IAppConfig::VALUE_INT, + self::FLOAT => IAppConfig::VALUE_FLOAT, + self::BOOL => IAppConfig::VALUE_BOOL, + self::ARRAY => IAppConfig::VALUE_ARRAY, + }; + } catch (UnhandledMatchError) { + throw new IncorrectTypeException('unknown type definition ' . $this->value); + } + } + +} diff --git a/lib/public/Federation/ICloudIdManager.php b/lib/public/Federation/ICloudIdManager.php index 03b6ced18f5..29e261ab3af 100644 --- a/lib/public/Federation/ICloudIdManager.php +++ b/lib/public/Federation/ICloudIdManager.php @@ -8,11 +8,14 @@ declare(strict_types=1); */ namespace OCP\Federation; +use OCP\AppFramework\Attribute\Consumable; + /** * Interface for resolving federated cloud ids * * @since 12.0.0 */ +#[Consumable(since: '12.0.0')] interface ICloudIdManager { /** * @param string $cloudId @@ -55,4 +58,28 @@ interface ICloudIdManager { * @since 30.0.0 - Optional parameter $httpsOnly was added */ public function removeProtocolFromUrl(string $url, bool $httpsOnly = false): string; + + /** + * @param string $id The remote cloud id + * @param string $user The user id on the remote server + * @param string $remote The base address of the remote server + * @param ?string $displayName The displayname of the remote user + * + * @since 32.0.0 + */ + public function createCloudId(string $id, string $user, string $remote, ?string $displayName = null): ICloudId; + + /** + * @param $resolver The cloud id resolver to register + * + * @since 32.0.0 + */ + public function registerCloudIdResolver(ICloudIdResolver $resolver): void; + + /** + * @param $resolver The cloud id resolver to unregister + * + * @since 32.0.0 + */ + public function unregisterCloudIdResolver(ICloudIdResolver $resolver): void; } diff --git a/lib/public/Federation/ICloudIdResolver.php b/lib/public/Federation/ICloudIdResolver.php new file mode 100644 index 00000000000..79f9ed11dd7 --- /dev/null +++ b/lib/public/Federation/ICloudIdResolver.php @@ -0,0 +1,40 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OCP\Federation; + +use OCP\AppFramework\Attribute\Consumable; +use OCP\AppFramework\Attribute\Implementable; + +/** + * Interface for resolving federated cloud ids + * + * @since 32.0.0 + */ +#[Consumable(since: '32.0.0')] +#[Implementable(since: '32.0.0')] +interface ICloudIdResolver { + /** + * @param string $cloudId + * @return ICloudId + * @throws \InvalidArgumentException + * + * @since 32.0.0 + */ + public function resolveCloudId(string $cloudId): ICloudId; + + /** + * Check if the input is a correctly formatted cloud id + * + * @param string $cloudId + * @return bool + * + * @since 32.0.0 + */ + public function isValidCloudId(string $cloudId): bool; +} diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php index 68d4332146e..d9e3e0d95a7 100644 --- a/lib/public/IAppConfig.php +++ b/lib/public/IAppConfig.php @@ -8,6 +8,7 @@ declare(strict_types=1); */ namespace OCP; +use OCP\Config\ValueType; use OCP\Exceptions\AppConfigUnknownKeyException; /** @@ -450,6 +451,33 @@ interface IAppConfig { public function getDetails(string $app, string $key): array; /** + * returns an array containing details about a config key. + * key/value pair are available only if it exists. + * + * ``` + * [ + * "app" => "myapp", + * "key" => "mykey", + * "value" => "current_value", + * "default" => "default_if_available", + * "definition" => "this is what it does", + * "note" => "enabling this is not compatible with that", + * "lazy" => false, + * "type" => 4, + * "typeString" => "string", + * 'sensitive' => false + * ] + * ``` + * + * @param string $app id of the app + * @param string $key config key + * + * @return array{app: string, key: string, lazy?: bool, valueType?: ValueType, valueTypeName?: string, sensitive?: bool, default?: string, definition?: string, note?: string} + * @since 32.0.0 + */ + public function getKeyDetails(string $app, string $key): array; + + /** * Convert string like 'string', 'integer', 'float', 'bool' or 'array' to * to bitflag {@see VALUE_STRING}, {@see VALUE_INT}, {@see VALUE_FLOAT}, * {@see VALUE_BOOL} and {@see VALUE_ARRAY} diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index 5d8c64e1314..a1bdb01fcd2 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -530,6 +530,20 @@ interface IShare { public function getToken(); /** + * Set the parent of this share + * + * @since 9.0.0 + */ + public function setParent(int $parent): self; + + /** + * Get the parent of this share. + * + * @since 9.0.0 + */ + public function getParent(): ?int; + + /** * Set the target path of this share relative to the recipients user folder. * * @param string $target diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index 9d7c8013a36..23187ca833e 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -208,4 +208,12 @@ interface IShareProvider { * @since 18.0.0 */ public function getAllShares(): iterable; + + /** + * Get all children of this share + * + * @return IShare[] + * @since 9.0.0 + */ + public function getChildren(IShare $parent); } diff --git a/lib/unstable/Config/Exceptions/IncorrectTypeException.php b/lib/unstable/Config/Exceptions/IncorrectTypeException.php index 274c95d732a..6b91959071a 100644 --- a/lib/unstable/Config/Exceptions/IncorrectTypeException.php +++ b/lib/unstable/Config/Exceptions/IncorrectTypeException.php @@ -12,6 +12,8 @@ use Exception; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Exceptions\IncorrectTypeException + * @see \OCP\Config\Exceptions\IncorrectTypeException */ class IncorrectTypeException extends Exception { } diff --git a/lib/unstable/Config/Exceptions/TypeConflictException.php b/lib/unstable/Config/Exceptions/TypeConflictException.php index c6825b7efcf..808679ed873 100644 --- a/lib/unstable/Config/Exceptions/TypeConflictException.php +++ b/lib/unstable/Config/Exceptions/TypeConflictException.php @@ -12,6 +12,8 @@ use Exception; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Exceptions\TypeConflictException + * @see \OCP\Config\Exceptions\TypeConflictException */ class TypeConflictException extends Exception { } diff --git a/lib/unstable/Config/Exceptions/UnknownKeyException.php b/lib/unstable/Config/Exceptions/UnknownKeyException.php index a3ca88a7b72..744ce25e48d 100644 --- a/lib/unstable/Config/Exceptions/UnknownKeyException.php +++ b/lib/unstable/Config/Exceptions/UnknownKeyException.php @@ -12,6 +12,8 @@ use Exception; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Exceptions\UnknownKeyException + * @see \OCP\Config\Exceptions\UnknownKeyException */ class UnknownKeyException extends Exception { } diff --git a/lib/unstable/Config/IUserConfig.php b/lib/unstable/Config/IUserConfig.php index b9cbb65ad03..bffd6a96ebd 100644 --- a/lib/unstable/Config/IUserConfig.php +++ b/lib/unstable/Config/IUserConfig.php @@ -28,14 +28,20 @@ use NCU\Config\Exceptions\UnknownKeyException; * during specific requests or actions to avoid loading the lazy values all the time. * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ interface IUserConfig { /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public const FLAG_SENSITIVE = 1; // value is sensitive /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public const FLAG_INDEXED = 2; // value should be indexed @@ -50,6 +56,8 @@ interface IUserConfig { * @return list<string> list of userIds * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getUserIds(string $appId = ''): array; @@ -64,6 +72,8 @@ interface IUserConfig { * @return list<string> list of app ids * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getApps(string $userId): array; @@ -79,6 +89,8 @@ interface IUserConfig { * @return list<string> list of stored config keys * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getKeys(string $userId, string $app): array; @@ -93,6 +105,8 @@ interface IUserConfig { * @return bool TRUE if key exists * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function hasKey(string $userId, string $app, string $key, ?bool $lazy = false): bool; @@ -108,6 +122,8 @@ interface IUserConfig { * @throws UnknownKeyException if config key is not known * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function isSensitive(string $userId, string $app, string $key, ?bool $lazy = false): bool; @@ -128,6 +144,8 @@ interface IUserConfig { * @throws UnknownKeyException if config key is not known * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function isIndexed(string $userId, string $app, string $key, ?bool $lazy = false): bool; @@ -145,6 +163,8 @@ interface IUserConfig { * @see IUserConfig for details about lazy loading * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function isLazy(string $userId, string $app, string $key): bool; @@ -162,6 +182,8 @@ interface IUserConfig { * @return array<string, string|int|float|bool|array> [key => value] * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getValues(string $userId, string $app, string $prefix = '', bool $filtered = false): array; @@ -177,6 +199,8 @@ interface IUserConfig { * @return array<string, string|int|float|bool|array> [key => value] * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getAllValues(string $userId, bool $filtered = false): array; @@ -192,6 +216,9 @@ interface IUserConfig { * @return array<string, string|int|float|bool|array> [appId => value] * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig + * @psalm-suppress DeprecatedClass */ public function getValuesByApps(string $userId, string $key, bool $lazy = false, ?ValueType $typedAs = null): array; @@ -209,6 +236,9 @@ interface IUserConfig { * @return array<string, string|int|float|bool|array> [userId => value] * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig + * @psalm-suppress DeprecatedClass */ public function getValuesByUsers(string $app, string $key, ?ValueType $typedAs = null, ?array $userIds = null): array; @@ -226,6 +256,8 @@ interface IUserConfig { * @return Generator<string> * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function searchUsersByValueString(string $app, string $key, string $value, bool $caseInsensitive = false): Generator; @@ -242,6 +274,8 @@ interface IUserConfig { * @return Generator<string> * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function searchUsersByValueInt(string $app, string $key, int $value): Generator; @@ -258,6 +292,8 @@ interface IUserConfig { * @return Generator<string> * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function searchUsersByValues(string $app, string $key, array $values): Generator; @@ -274,6 +310,8 @@ interface IUserConfig { * @return Generator<string> * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function searchUsersByValueBool(string $app, string $key, bool $value): Generator; @@ -291,6 +329,8 @@ interface IUserConfig { * @return string stored config value or $default if not set in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see getValueInt() @@ -314,6 +354,8 @@ interface IUserConfig { * @return int stored config value or $default if not set in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see getValueString() @@ -337,6 +379,8 @@ interface IUserConfig { * @return float stored config value or $default if not set in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see getValueString() @@ -360,6 +404,8 @@ interface IUserConfig { * @return bool stored config value or $default if not set in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserPrefences for explanation about lazy loading * @see getValueString() @@ -383,6 +429,8 @@ interface IUserConfig { * @return array stored config value or $default if not set in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see getValueString() @@ -408,6 +456,9 @@ interface IUserConfig { * @throws IncorrectTypeException if config value type is not known * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig + * @psalm-suppress DeprecatedClass */ public function getValueType(string $userId, string $app, string $key, ?bool $lazy = null): ValueType; @@ -427,6 +478,8 @@ interface IUserConfig { * @throws IncorrectTypeException if config value type is not known * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getValueFlags(string $userId, string $app, string $key, bool $lazy = false): int; @@ -448,6 +501,8 @@ interface IUserConfig { * @return bool TRUE if value was different, therefor updated in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see setValueInt() @@ -480,6 +535,8 @@ interface IUserConfig { * @return bool TRUE if value was different, therefor updated in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see setValueString() @@ -507,6 +564,8 @@ interface IUserConfig { * @return bool TRUE if value was different, therefor updated in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see setValueString() @@ -533,6 +592,8 @@ interface IUserConfig { * @return bool TRUE if value was different, therefor updated in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see setValueString() @@ -560,6 +621,8 @@ interface IUserConfig { * @return bool TRUE if value was different, therefor updated in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig * * @see IUserConfig for explanation about lazy loading * @see setValueString() @@ -582,6 +645,8 @@ interface IUserConfig { * @return bool TRUE if database update were necessary * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateSensitive(string $userId, string $app, string $key, bool $sensitive): bool; @@ -595,6 +660,8 @@ interface IUserConfig { * @param bool $sensitive TRUE to set as sensitive, FALSE to unset * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateGlobalSensitive(string $app, string $key, bool $sensitive): void; @@ -612,6 +679,8 @@ interface IUserConfig { * @return bool TRUE if database update were necessary * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateIndexed(string $userId, string $app, string $key, bool $indexed): bool; @@ -625,6 +694,8 @@ interface IUserConfig { * @param bool $indexed TRUE to set as indexed, FALSE to unset * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateGlobalIndexed(string $app, string $key, bool $indexed): void; @@ -639,6 +710,8 @@ interface IUserConfig { * @return bool TRUE if database update was necessary * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateLazy(string $userId, string $app, string $key, bool $lazy): bool; @@ -652,6 +725,8 @@ interface IUserConfig { * @param bool $lazy TRUE to set as lazy loaded, FALSE to unset * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function updateGlobalLazy(string $app, string $key, bool $lazy): void; @@ -678,6 +753,8 @@ interface IUserConfig { * @throws UnknownKeyException if config key is not known in database * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function getDetails(string $userId, string $app, string $key): array; @@ -689,6 +766,8 @@ interface IUserConfig { * @param string $key config key * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function deleteUserConfig(string $userId, string $app, string $key): void; @@ -699,6 +778,8 @@ interface IUserConfig { * @param string $key config key * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function deleteKey(string $app, string $key): void; @@ -708,6 +789,8 @@ interface IUserConfig { * @param string $app id of the app * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function deleteApp(string $app): void; @@ -717,6 +800,8 @@ interface IUserConfig { * @param string $userId id of the user * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function deleteAllUserConfig(string $userId): void; @@ -729,6 +814,8 @@ interface IUserConfig { * @param bool $reload set to TRUE to refill cache instantly after clearing it * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function clearCache(string $userId, bool $reload = false): void; @@ -737,6 +824,8 @@ interface IUserConfig { * The cache will be rebuilt only the next time a user config is requested. * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\IUserConfig + * @see \OCP\Config\IUserConfig */ public function clearCacheAll(): void; } diff --git a/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php b/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php index 068d89ce764..2587cd52c01 100644 --- a/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php +++ b/lib/unstable/Config/Lexicon/ConfigLexiconEntry.php @@ -16,9 +16,16 @@ use NCU\Config\ValueType; * * @see IConfigLexicon * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry + * @psalm-suppress DeprecatedClass */ class ConfigLexiconEntry { - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry + */ public const RENAME_INVERT_BOOLEAN = 1; private string $definition = ''; @@ -34,6 +41,8 @@ class ConfigLexiconEntry { * @param bool $deprecated set config key as deprecated * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry * @psalm-suppress PossiblyInvalidCast * @psalm-suppress RiskyCast */ @@ -64,6 +73,8 @@ class ConfigLexiconEntry { * * @return string config key * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function getKey(): string { return $this->key; @@ -74,6 +85,9 @@ class ConfigLexiconEntry { * * @return ValueType * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry + * @psalm-suppress DeprecatedClass */ public function getValueType(): ValueType { return $this->type; @@ -83,6 +97,8 @@ class ConfigLexiconEntry { * @param string $default * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ private function convertFromString(string $default): string { return $default; @@ -92,6 +108,8 @@ class ConfigLexiconEntry { * @param int $default * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ private function convertFromInt(int $default): string { return (string)$default; @@ -101,6 +119,8 @@ class ConfigLexiconEntry { * @param float $default * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ private function convertFromFloat(float $default): string { return (string)$default; @@ -110,6 +130,8 @@ class ConfigLexiconEntry { * @param bool $default * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ private function convertFromBool(bool $default): string { return ($default) ? '1' : '0'; @@ -119,6 +141,8 @@ class ConfigLexiconEntry { * @param array $default * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ private function convertFromArray(array $default): string { return json_encode($default); @@ -129,6 +153,10 @@ class ConfigLexiconEntry { * * @return string|null NULL if no default is set * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry + * @psalm-suppress DeprecatedClass + * @psalm-suppress DeprecatedMethod */ public function getDefault(Preset $preset): ?string { if ($this->default !== null) { @@ -157,8 +185,13 @@ class ConfigLexiconEntry { * * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry * @psalm-suppress PossiblyInvalidCast arrays are managed pre-cast * @psalm-suppress RiskyCast + * @psalm-suppress DeprecatedClass + * @psalm-suppress DeprecatedMethod + * @psalm-suppress DeprecatedConstant */ public function convertToString(string|int|float|bool|array $entry): string { // in case $default is array but is not expected to be an array... @@ -181,6 +214,8 @@ class ConfigLexiconEntry { * * @return string * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function getDefinition(): string { return $this->definition; @@ -192,6 +227,8 @@ class ConfigLexiconEntry { * @see IAppConfig for details on lazy config values * @return bool TRUE if config value is lazy * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function isLazy(): bool { return $this->lazy; @@ -203,6 +240,8 @@ class ConfigLexiconEntry { * @see IAppConfig for details on sensitive config values * @return int bitflag about the config value * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function getFlags(): int { return $this->flags; @@ -213,6 +252,9 @@ class ConfigLexiconEntry { * * @return bool TRUE is config value bitflag contains $flag * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry + * @psalm-suppress DeprecatedMethod */ public function isFlagged(int $flag): bool { return (($flag & $this->getFlags()) === $flag); @@ -224,6 +266,8 @@ class ConfigLexiconEntry { * * @return string|null not NULL if value can be imported from a previous key * @experimental 32.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function getRename(): ?string { return $this->rename; @@ -231,6 +275,8 @@ class ConfigLexiconEntry { /** * @experimental 32.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry * @return bool TRUE if $option was set during the creation of the entry. */ public function hasOption(int $option): bool { @@ -242,6 +288,8 @@ class ConfigLexiconEntry { * * @return bool TRUE if config si deprecated * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Entry + * @see \OCP\Config\Lexicon\Entry */ public function isDeprecated(): bool { return $this->deprecated; diff --git a/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php b/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php index a6490675c8a..2ccd7bd265c 100644 --- a/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php +++ b/lib/unstable/Config/Lexicon/ConfigLexiconStrictness.php @@ -17,14 +17,32 @@ namespace NCU\Config\Lexicon; * - **ConfigLexiconStrictness::EXCEPTION** - block (throws exception) and report * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness + * @see \OCP\Config\Lexicon\Strictness */ enum ConfigLexiconStrictness { - /** @experimental 31.0.0 */ + /** + * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness + * @see \OCP\Config\Lexicon\Strictness + */ case IGNORE; // fully ignore - /** @experimental 31.0.0 */ + /** + * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness + * @see \OCP\Config\Lexicon\Strictness + */ case NOTICE; // ignore and report - /** @experimental 31.0.0 */ + /** + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness + * @see \OCP\Config\Lexicon\Strictness + * @experimental 31.0.0 + */ case WARNING; // silently block (returns $default) and report - /** @experimental 31.0.0 */ + /** + * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Strictness + * @see \OCP\Config\Lexicon\Strictness + */ case EXCEPTION; // block (throws exception) and report } diff --git a/lib/unstable/Config/Lexicon/IConfigLexicon.php b/lib/unstable/Config/Lexicon/IConfigLexicon.php index 3fedb5f1f08..74dc19e7728 100644 --- a/lib/unstable/Config/Lexicon/IConfigLexicon.php +++ b/lib/unstable/Config/Lexicon/IConfigLexicon.php @@ -13,6 +13,8 @@ namespace NCU\Config\Lexicon; * The config lexicon is used to avoid conflicts and problems when storing/retrieving config values * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon + * @see \OCP\Config\Lexicon\ILexicon */ interface IConfigLexicon { @@ -20,9 +22,12 @@ interface IConfigLexicon { * Define the expected behavior when using config * keys not set within your application config lexicon. * - * @see ConfigLexiconStrictness * @return ConfigLexiconStrictness * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon + * @see \OCP\Config\Lexicon\ILexicon + * @psalm-suppress DeprecatedClass + * */ public function getStrictness(): ConfigLexiconStrictness; @@ -31,6 +36,9 @@ interface IConfigLexicon { * * @return ConfigLexiconEntry[] * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon + * @see \OCP\Config\Lexicon\ILexicon + * @psalm-suppress DeprecatedClass */ public function getAppConfigs(): array; @@ -39,6 +47,9 @@ interface IConfigLexicon { * * @return ConfigLexiconEntry[] * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\ILexicon + * @see \OCP\Config\Lexicon\ILexicon + * @psalm-suppress DeprecatedClass */ public function getUserConfigs(): array; } diff --git a/lib/unstable/Config/Lexicon/Preset.php b/lib/unstable/Config/Lexicon/Preset.php index 92a6fd8cbfa..b2a98ed5647 100644 --- a/lib/unstable/Config/Lexicon/Preset.php +++ b/lib/unstable/Config/Lexicon/Preset.php @@ -23,24 +23,53 @@ namespace NCU\Config\Lexicon; * - **Preset::PRIVATE** - Private * * @experimental 32.0.0 + * @deprecated 32.0.0 use \OCP\Config\Lexicon\Preset + * @see \OCP\Config\Lexicon\Preset */ enum Preset: int { - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case LARGE = 8; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case MEDIUM = 7; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case SMALL = 6; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case SHARED = 5; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case EDUCATION = 4; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case CLUB = 3; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case FAMILY = 2; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case PRIVATE = 1; - /** @experimental 32.0.0 */ + /** + * @experimental 32.0.0 + * @deprecated 32.0.0 + */ case NONE = 0; } diff --git a/lib/unstable/Config/ValueType.php b/lib/unstable/Config/ValueType.php index b1181674953..73714640445 100644 --- a/lib/unstable/Config/ValueType.php +++ b/lib/unstable/Config/ValueType.php @@ -16,30 +16,44 @@ use UnhandledMatchError; * Listing of available value type for typed config value * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ enum ValueType: int { /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case MIXED = 0; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case STRING = 1; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case INT = 2; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case FLOAT = 3; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case BOOL = 4; /** * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType */ case ARRAY = 5; @@ -52,6 +66,10 @@ enum ValueType: int { * @throws IncorrectTypeException * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType + * @psalm-suppress DeprecatedConstant + * @psalm-suppress DeprecatedClass */ public static function fromStringDefinition(string $definition): self { try { @@ -75,6 +93,10 @@ enum ValueType: int { * @throws IncorrectTypeException * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType + * @psalm-suppress DeprecatedConstant + * @psalm-suppress DeprecatedClass */ public function getDefinition(): string { try { @@ -98,6 +120,10 @@ enum ValueType: int { * @throws IncorrectTypeException * * @experimental 31.0.0 + * @deprecated 32.0.0 use \OCP\Config\ValueType + * @see \OCP\Config\ValueType + * @psalm-suppress DeprecatedConstant + * @psalm-suppress DeprecatedClass */ public function toAppConfigFlag(): int { try { |